builtin expect passed to select instruction gets ignored. This patch fixes the issue.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Transforms/Scalar/LowerExpectIntrinsic.cpp | ||
|---|---|---|
| 86 ↗ | (On Diff #70133) | Neat trick. :) |
| 159 ↗ | (On Diff #70133) | Fix comment to indicate why we are using reverse iterator (and that we're also handling selects in this loop). |
| 160 ↗ | (On Diff #70133) | Use 'auto' to avoid 80-col ugliness? |
| test/Transforms/LowerExpectIntrinsic/basic.ll | ||
| 276–287 ↗ | (On Diff #70133) | Minimize test? define i32 @test10(i64 %t6) {
%t7 = call i64 @llvm.expect.i64(i64 %t6, i64 0)
%t8 = icmp ne i64 %t7, 0
%t9 = select i1 %t8, i32 42, i32 43
ret i32 %t9
} |