diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-06-28 18:07:29 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-06-28 18:07:29 +0000 |
commit | 65aeba70dedc4195ecc48b4920c51e745b69c1d8 (patch) | |
tree | d6fefba061ed299a17fa676b16f096ff5b47f292 /llvm/test/Transforms | |
parent | be9931dc85ff22150979b4dcac99c112c3ffc72c (diff) | |
download | bcm5719-llvm-65aeba70dedc4195ecc48b4920c51e745b69c1d8.tar.gz bcm5719-llvm-65aeba70dedc4195ecc48b4920c51e745b69c1d8.zip |
[InstCombine] Remove 64-bit bit width restriction from m_ConstantInt(uint64_t*&)
I think we only need to make sure the value fits in 64-bits not that bit width is 64-bit.
This helps places that use this for shift amounts since the shift amount needs to be the same bitwidth as the LHS, but can't be larger than the bit width.
Differential Revision: https://reviews.llvm.org/D34737
llvm-svn: 306577
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/InstCombine/icmp.ll | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll index 03a9f527555..b12ee917a82 100644 --- a/llvm/test/Transforms/InstCombine/icmp.ll +++ b/llvm/test/Transforms/InstCombine/icmp.ll @@ -762,16 +762,11 @@ define i1 @test52(i32 %x1) { ret i1 %A } -; TODO we have a 64-bit or less restriction in the handling for this pattern. We should remove that and do the same thing we do above. define i1 @test52b(i128 %x1) { ; CHECK-LABEL: @test52b( -; CHECK-NEXT: [[CONV:%.*]] = and i128 [[X1:%.*]], 255 -; CHECK-NEXT: [[CMP:%.*]] = icmp eq i128 [[CONV]], 127 -; CHECK-NEXT: [[TMP2:%.*]] = lshr i128 [[X1]], 16 -; CHECK-NEXT: [[TMP3:%.*]] = trunc i128 [[TMP2]] to i8 -; CHECK-NEXT: [[CMP15:%.*]] = icmp eq i8 [[TMP3]], 76 -; CHECK-NEXT: [[A:%.*]] = and i1 [[CMP]], [[CMP15]] -; CHECK-NEXT: ret i1 [[A]] +; CHECK-NEXT: [[TMP1:%.*]] = and i128 [[X1:%.*]], 16711935 +; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i128 [[TMP1]], 4980863 +; CHECK-NEXT: ret i1 [[TMP2]] ; %conv = and i128 %x1, 255 %cmp = icmp eq i128 %conv, 127 |