diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-04-10 16:28:08 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-04-10 16:28:08 +0000 |
| commit | 8c1cc5abbb0e2fe0df8019b2bcd10b465021fc24 (patch) | |
| tree | 8d5407aa3604289dfbc2537c28f095c466a73a89 | |
| parent | 96e541a7cf67ed44814f809ae2dd4e02189e3704 (diff) | |
| download | bcm5719-llvm-8c1cc5abbb0e2fe0df8019b2bcd10b465021fc24.tar.gz bcm5719-llvm-8c1cc5abbb0e2fe0df8019b2bcd10b465021fc24.zip | |
[InstCombine] add test for PR32524; NFC
llvm-svn: 299846
| -rw-r--r-- | llvm/test/Transforms/InstCombine/or.ll | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/or.ll b/llvm/test/Transforms/InstCombine/or.ll index be1e8e6d4a9..2ac6f5b1104 100644 --- a/llvm/test/Transforms/InstCombine/or.ll +++ b/llvm/test/Transforms/InstCombine/or.ll @@ -215,11 +215,25 @@ define i1 @test19(i32 %A) { ; %B = icmp eq i32 %A, 50 %C = icmp eq i32 %A, 51 - ;; (A&-2) == 50 %D = or i1 %B, %C ret i1 %D } +; PR32524: https://bugs.llvm.org/show_bug.cgi?id=32524 + +define i1 @or_icmps_eq_diff1(i32 %x) { +; CHECK-LABEL: @or_icmps_eq_diff1( +; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 %x, -1 +; CHECK-NEXT: [[CMP2:%.*]] = icmp eq i32 %x, 0 +; CHECK-NEXT: [[LOGIC:%.*]] = or i1 [[CMP1]], [[CMP2]] +; CHECK-NEXT: ret i1 [[LOGIC]] +; + %cmp1 = icmp eq i32 %x, -1 + %cmp2 = icmp eq i32 %x, 0 + %logic = or i1 %cmp1, %cmp2 + ret i1 %logic +} + define i32 @test20(i32 %x) { ; CHECK-LABEL: @test20( ; CHECK-NEXT: ret i32 %x |

