Created
May 13, 2013 18:33
-
-
Save fwinter/5570361 to your computer and use it in GitHub Desktop.
Simplified label %L3. GVN succeeds.
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
define void @main(i1 %arg0, i32 %arg1, i32 %arg2, i32 %arg3, i1 %arg4, i32 %arg5, i32* %arg6, i1* %arg7) { | |
entrypoint: | |
%0 = sext i1 %arg4 to i32 | |
%1 = xor i32 -1, %0 | |
%2 = icmp sge i32 %arg5, %arg1 | |
br i1 %2, label %L0, label %L1 | |
L0: ; preds = %entrypoint | |
ret void | |
L1: ; preds = %entrypoint | |
br i32 %1, label %L3, label %L4 | |
L2: ; preds = %L3, %L4 | |
%3 = phi i32 [ %6, %L4 ], [ %4, %L3 ] | |
br i1 %arg0, label %L5, label %L6 | |
L3: ; preds = %L1 | |
%4 = add i32 %arg5, %arg2 | |
br label %L2 | |
L4: ; preds = %L1 | |
%5 = getelementptr i32* %arg6, i32 %arg5 | |
%6 = load i32* %5 | |
br label %L2 | |
L5: ; preds = %L2 | |
%7 = icmp sgt i32 %3, %arg3 | |
br i1 %7, label %L10, label %L11 | |
L6: ; preds = %L2 | |
%8 = getelementptr i1* %arg7, i32 %3 | |
%9 = load i1* %8 | |
%10 = sext i1 %9 to i32 | |
%11 = xor i32 -1, %10 | |
br i32 %11, label %L8, label %L9 | |
L7: ; preds = %L13, %L9 | |
ret void | |
L8: ; preds = %L6 | |
ret void | |
L9: ; preds = %L6 | |
br label %L7 | |
L10: ; preds = %L5 | |
ret void | |
L11: ; preds = %L5 | |
%12 = icmp slt i32 %3, %arg2 | |
br i1 %12, label %L12, label %L13 | |
L12: ; preds = %L11 | |
ret void | |
L13: ; preds = %L11 | |
br label %L7 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment