diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-06-03 18:50:29 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-06-03 18:50:29 +0000 |
commit | 7c553edcedca1c085af33906eb4549114da21f34 (patch) | |
tree | 8b3c021013b0c0380142c57d8bdef46dd992189c /llvm/test | |
parent | 36fa2f0dee480b4fcc3de67ee881faac7709a2a9 (diff) | |
download | bcm5719-llvm-7c553edcedca1c085af33906eb4549114da21f34.tar.gz bcm5719-llvm-7c553edcedca1c085af33906eb4549114da21f34.zip |
[ConstantFolding] Fix constant folding for vector cttz and ctlz intrinsics to understand that the second argument is still a scalar.
llvm-svn: 304668
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Transforms/InstCombine/intrinsics.ll | 6 | ||||
-rw-r--r-- | llvm/test/Transforms/InstSimplify/call.ll | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/intrinsics.ll b/llvm/test/Transforms/InstCombine/intrinsics.ll index 04b9088e362..abe0c784754 100644 --- a/llvm/test/Transforms/InstCombine/intrinsics.ll +++ b/llvm/test/Transforms/InstCombine/intrinsics.ll @@ -537,8 +537,7 @@ define i32 @ctlz_undef(i32 %Value) { define <2 x i32> @ctlz_undef_vec(<2 x i32> %Value) { ; CHECK-LABEL: @ctlz_undef_vec( -; CHECK-NEXT: [[CTLZ:%.*]] = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> zeroinitializer, i1 true) -; CHECK-NEXT: ret <2 x i32> [[CTLZ]] +; CHECK-NEXT: ret <2 x i32> undef ; %ctlz = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> zeroinitializer, i1 true) ret <2 x i32> %ctlz @@ -575,8 +574,7 @@ define i32 @cttz_undef(i32 %Value) nounwind { define <2 x i32> @cttz_undef_vec(<2 x i32> %Value) nounwind { ; CHECK-LABEL: @cttz_undef_vec( -; CHECK-NEXT: [[CTTZ:%.*]] = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> zeroinitializer, i1 true) -; CHECK-NEXT: ret <2 x i32> [[CTTZ]] +; CHECK-NEXT: ret <2 x i32> undef ; %cttz = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> zeroinitializer, i1 true) ret <2 x i32> %cttz diff --git a/llvm/test/Transforms/InstSimplify/call.ll b/llvm/test/Transforms/InstSimplify/call.ll index ee8f35aa7cd..994ff6b8c0d 100644 --- a/llvm/test/Transforms/InstSimplify/call.ll +++ b/llvm/test/Transforms/InstSimplify/call.ll @@ -203,8 +203,7 @@ declare <2 x i256> @llvm.cttz.v2i256(<2 x i256> %src, i1 %is_zero_undef) define <2 x i256> @test_cttz_vec() { ; CHECK-LABEL: @test_cttz_vec( -; CHECK-NEXT: [[X:%.*]] = call <2 x i256> @llvm.cttz.v2i256(<2 x i256> <i256 10, i256 10>, i1 false) -; CHECK-NEXT: ret <2 x i256> [[X]] +; CHECK-NEXT: ret <2 x i256> <i256 1, i256 1> ; %x = call <2 x i256> @llvm.cttz.v2i256(<2 x i256> <i256 10, i256 10>, i1 false) ret <2 x i256> %x |