diff options
author | Owen Anderson <resistor@mac.com> | 2011-01-11 00:36:45 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-01-11 00:36:45 +0000 |
commit | da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2 (patch) | |
tree | ba0ea2ae5721d9e2aad293f7da32c13844e71ec9 /test | |
parent | 93c70426f581859f197df1b05fdb1b3664d361a0 (diff) | |
download | external_llvm-da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2.zip external_llvm-da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2.tar.gz external_llvm-da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2.tar.bz2 |
Fix a random missed optimization by making InstCombine more aggressive when determining which bits are demanded by
a comparison against a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/icmp.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll index e33463d..8a0b8ff 100644 --- a/test/Transforms/InstCombine/icmp.ll +++ b/test/Transforms/InstCombine/icmp.ll @@ -192,3 +192,20 @@ define i1 @test20(i32 %x) nounwind { ; CHECK-NEXT: %cmp = icmp eq i32 %x, 3 } +define i1 @test21(i8 %x, i8 %y) { +; CHECK: @test21 +; CHECK-NOT: or i8 +; CHECK: icmp ugt + %A = or i8 %x, 1 + %B = icmp ugt i8 %A, 3 + ret i1 %B +} + +define i1 @test22(i8 %x, i8 %y) { +; CHECK: @test22 +; CHECK-NOT: or i8 +; CHECK: icmp ult + %A = or i8 %x, 1 + %B = icmp ult i8 %A, 4 + ret i1 %B +} |