-
-
Save nikic/9516dede0acedd8d320e9d067559e667 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
target triple = "x86_64-unknown-linux-gnu" | |
define i1 @test() { | |
start: | |
%_6 = alloca [2 x i64], align 8 | |
%_2 = alloca [2 x i64], align 8 | |
%0 = bitcast [2 x i64]* %_2 to i8* | |
%1 = getelementptr inbounds [2 x i64], [2 x i64]* %_2, i64 0, i64 0 | |
store i64 -5015437470765251660, i64* %1, align 8 | |
%2 = getelementptr inbounds [2 x i64], [2 x i64]* %_2, i64 0, i64 1 | |
store i64 -8661621401413125213, i64* %2, align 8 | |
%3 = bitcast [2 x i64]* %_6 to i8* | |
%4 = getelementptr inbounds [2 x i64], [2 x i64]* %_6, i64 0, i64 0 | |
store i64 -5015437470765251660, i64* %4, align 8 | |
%5 = getelementptr inbounds [2 x i64], [2 x i64]* %_6, i64 0, i64 1 | |
store i64 -8661621401413125213, i64* %5, align 8 | |
br label %loop | |
loop: | |
%iv = phi i64 [ 0, %start ], [ %iv.next, %latch ] | |
%exitcond = icmp eq i64 %iv, 2 | |
br i1 %exitcond, label %exit, label %latch | |
latch: | |
%iv.next = add nuw nsw i64 %iv, 1 | |
%gep1 = getelementptr inbounds [2 x i64], [2 x i64]* %_6, i64 0, i64 %iv | |
%gep2 = getelementptr inbounds [2 x i64], [2 x i64]* %_2, i64 0, i64 %iv | |
%load1 = load i64, i64* %gep1, align 8 | |
%load2 = load i64, i64* %gep2, align 8 | |
%exitcond2 = icmp eq i64 %load1, %load2 | |
br i1 %exitcond2, label %loop, label %exit | |
exit: | |
%exit.val = phi i1 [ %exitcond, %latch ], [ %exitcond, %loop ] | |
ret i1 %exit.val | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment