diff options
| author | Craig Topper <craig.topper@intel.com> | 2017-08-28 22:00:27 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2017-08-28 22:00:27 +0000 |
| commit | 516e39cd38cd253b20b1b3b56f5a88a057bbecb1 (patch) | |
| tree | 90607c53a2305d072d8f8ca4e743c4405625ae96 /llvm/test/Transforms/LoopVectorize | |
| parent | 72aa937ed8cf9a0478bc9908f80ce51e372e8ef4 (diff) | |
| download | bcm5719-llvm-516e39cd38cd253b20b1b3b56f5a88a057bbecb1.tar.gz bcm5719-llvm-516e39cd38cd253b20b1b3b56f5a88a057bbecb1.zip | |
[InstCombine] Teach select01 helper of foldSelectIntoOp to handle vector splats
We were handling some vectors in foldSelectIntoOp, but not if the operand of the bin op was any kind of vector constant. This patch fixes it to treat vector splats the same as scalars.
Differential Revision: https://reviews.llvm.org/D37232
llvm-svn: 311940
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize')
| -rw-r--r-- | llvm/test/Transforms/LoopVectorize/phi-cost.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/phi-cost.ll b/llvm/test/Transforms/LoopVectorize/phi-cost.ll index 5ccea66c76a..057c55d55d3 100644 --- a/llvm/test/Transforms/LoopVectorize/phi-cost.ll +++ b/llvm/test/Transforms/LoopVectorize/phi-cost.ll @@ -10,8 +10,8 @@ target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128" ; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %vector.ph ], [ [[INDEX_NEXT:%.*]], %vector.body ] ; CHECK: [[WIDE_LOAD:%.*]] = load <2 x i32>, <2 x i32>* {{.*}} ; CHECK: [[TMP5:%.*]] = icmp sgt <2 x i32> [[WIDE_LOAD]], zeroinitializer -; CHECK-NEXT: [[TMP6:%.*]] = add <2 x i32> [[WIDE_LOAD]], <i32 1, i32 1> -; CHECK-NEXT: [[PREDPHI:%.*]] = select <2 x i1> [[TMP5]], <2 x i32> [[TMP6]], <2 x i32> [[WIDE_LOAD]] +; CHECK-NEXT: [[TMP6:%.*]] = zext <2 x i1> [[TMP5]] to <2 x i32> +; CHECK-NEXT: [[PREDPHI:%.*]] = add <2 x i32> [[WIDE_LOAD]], [[TMP6]] ; CHECK: store <2 x i32> [[PREDPHI]], <2 x i32>* {{.*}} ; CHECK-NEXT: [[INDEX_NEXT]] = add i64 [[INDEX]], 2 ; |

