-
-
Save LemonBoy/203846aac164a7e4dba92d9081898887 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Execute with: | |
; opt -debug -print-after-all -disable-output -indvars <file.ll> | |
@0 = internal unnamed_addr constant [2 x i8] c".\00", align 1 | |
define internal fastcc i64 @lastIndexOfLinear(i8* %.0.0.val, i64 %.0.1.val) unnamed_addr #1 { | |
; Preheader: | |
Entry: | |
br label %WhileCond | |
; Loop: | |
WhileCond: ; preds = %eql.exit, %Entry | |
%i.0.in = phi i64 [ %.0.1.val, %Entry ], [ %i.0, %eql.exit ] | |
%i.0 = add i64 %i.0.in, -1 | |
%0 = getelementptr inbounds i8, i8* %.0.0.val, i64 %i.0 | |
%.not = icmp eq i8* %0, getelementptr inbounds ([2 x i8], [2 x i8]* @0, i64 0, i64 0) | |
br i1 %.not, label %Then, label %eql.exit | |
eql.exit: ; preds = %WhileCond | |
%1 = load i8, i8* %0, align 1 | |
%.not1.i = icmp eq i8 %1, 46 | |
%2 = icmp eq i64 %i.0, 0 | |
%or.cond = or i1 %2, %.not1.i | |
br i1 %or.cond, label %Then, label %WhileCond | |
; Exit blocks | |
Then: ; preds = %WhileCond, %eql.exit | |
%i.0.lcssa = phi i64 [ %i.0, %WhileCond ], [ %i.0, %eql.exit ] | |
ret i64 %i.0.lcssa | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment