diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-01-29 17:11:18 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-01-29 17:11:18 +0000 |
| commit | 062adaab8391b1b4df7b24251e5f05d78a53e9c2 (patch) | |
| tree | edeca336234d335d9ccb295a7dab70689eb0efc8 /llvm/test/Transforms | |
| parent | c00574830fd4eb03c1869f6d87cbe11d2ee56890 (diff) | |
| download | bcm5719-llvm-062adaab8391b1b4df7b24251e5f05d78a53e9c2.tar.gz bcm5719-llvm-062adaab8391b1b4df7b24251e5f05d78a53e9c2.zip | |
[InstCombine] enable (X >>?,exact C1) << C2 --> X << (C2 - C1) for vectors with splats
llvm-svn: 293435
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/shift.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/shift.ll b/llvm/test/Transforms/InstCombine/shift.ll index 1fd7d2e2406..ac5b27648ee 100644 --- a/llvm/test/Transforms/InstCombine/shift.ll +++ b/llvm/test/Transforms/InstCombine/shift.ll @@ -1,6 +1,4 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; This test makes sure that these instructions are properly eliminated. -; ; RUN: opt < %s -instcombine -S | FileCheck %s define i32 @test1(i32 %A) { @@ -840,8 +838,7 @@ define i32 @test48_nuw_nsw(i32 %x) { define <2 x i32> @test48_splat_vec(<2 x i32> %x) { ; CHECK-LABEL: @test48_splat_vec( -; CHECK-NEXT: [[A:%.*]] = lshr exact <2 x i32> %x, <i32 1, i32 1> -; CHECK-NEXT: [[B:%.*]] = shl nuw nsw <2 x i32> [[A]], <i32 3, i32 3> +; CHECK-NEXT: [[B:%.*]] = shl nuw nsw <2 x i32> %x, <i32 2, i32 2> ; CHECK-NEXT: ret <2 x i32> [[B]] ; %A = lshr exact <2 x i32> %x, <i32 1, i32 1> @@ -877,8 +874,7 @@ define i32 @test49_nuw_nsw(i32 %x) { define <2 x i32> @test49_splat_vec(<2 x i32> %x) { ; CHECK-LABEL: @test49_splat_vec( -; CHECK-NEXT: [[A:%.*]] = ashr exact <2 x i32> %x, <i32 1, i32 1> -; CHECK-NEXT: [[B:%.*]] = shl nuw nsw <2 x i32> [[A]], <i32 3, i32 3> +; CHECK-NEXT: [[B:%.*]] = shl nuw nsw <2 x i32> %x, <i32 2, i32 2> ; CHECK-NEXT: ret <2 x i32> [[B]] ; %A = ashr exact <2 x i32> %x, <i32 1, i32 1> |

