We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://alive2.llvm.org/ce/z/wGyVbz
define i1 @src(i64 %a, i64 %b, i64 %c, i64 %d) { start: %_5 = icmp eq i64 %a, %c br i1 %_5, label %bb2, label %bb3 bb2: ; preds = %start switch i64 %a, label %bb5 [ i64 0, label %bb4 i64 1, label %bb6 i64 2, label %bb7 ] bb3: ; preds = %bb4, %bb6, %bb7, %start %_0.0 = phi i1 [ false, %start ], [ %2, %bb7 ], [ %1, %bb6 ], [ %0, %bb4 ] ret i1 %_0.0 bb5: ; preds = %bb2 unreachable bb4: ; preds = %bb2 %0 = icmp eq i64 %b, %d br label %bb3 bb6: ; preds = %bb2 %1 = icmp eq i64 %b, %d br label %bb3 bb7: ; preds = %bb2 %2 = icmp eq i64 %b, %d br label %bb3 }
We could hoist common instructions, like this:
define i1 @tgt(i64 %a, i64 %b, i64 %c, i64 %d) { start: %_5 = icmp eq i64 %a, %c br i1 %_5, label %bb2, label %bb3 bb2: ; preds = %start %0 = icmp eq i64 %b, %d switch i64 %a, label %bb5 [ i64 0, label %bb4 i64 1, label %bb6 i64 2, label %bb7 ] bb3: ; preds = %bb4, %bb6, %bb7, %start %_0.0 = phi i1 [ false, %start ], [ %0, %bb7 ], [ %0, %bb6 ], [ %0, %bb4 ] ret i1 %_0.0 bb5: ; preds = %bb2 unreachable bb4: ; preds = %bb2 br label %bb3 bb6: ; preds = %bb2 br label %bb3 bb7: ; preds = %bb2 br label %bb3 }
Final optimization is:
define i1 @tgt(i64 %a, i64 %b, i64 %c, i64 %d) { %_5 = icmp eq i64 %a, %c %0 = icmp eq i64 %b, %d %_0.0 = select i1 %_5, i1 %0, i1 false ret i1 %_0.0 }
The text was updated successfully, but these errors were encountered:
eq
96ea48f
Sorry, something went wrong.
dianqk
No branches or pull requests
https://alive2.llvm.org/ce/z/wGyVbz
We could hoist common instructions, like this:
Final optimization is:
The text was updated successfully, but these errors were encountered: