summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-08-20 23:17:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-08-20 23:17:11 +0000
commitbd6dc142306f5caaa87725f5f58c29b37da9cc32 (patch)
treed127d2e1d8e8e75e811f758b979a2fce515ee67b /llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
parenta152903c1be57b863e2d6f3050564f4ec2602a26 (diff)
downloadbcm5719-llvm-bd6dc142306f5caaa87725f5f58c29b37da9cc32.tar.gz
bcm5719-llvm-bd6dc142306f5caaa87725f5f58c29b37da9cc32.zip
Revert r311077: [LV] Using VPlan ...
This causes LLVM to assert fail on PPC64 and crash / infloop in other cases. Filed http://llvm.org/PR34248 with reproducer attached. llvm-svn: 311304
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll')
-rw-r--r--llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
index bc9247f8071..3a8237ff84f 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
@@ -467,6 +467,13 @@ for.body:
; SINK-AFTER: %[[VCONV:.+]] = sext <4 x i16> %[[VSHUF]] to <4 x i32>
; SINK-AFTER: %[[VCONV3:.+]] = sext <4 x i16> %wide.load to <4 x i32>
; SINK-AFTER: mul nsw <4 x i32> %[[VCONV3]], %[[VCONV]]
+; Check also that the sext sank after the load in the scalar loop.
+; SINK-AFTER: for.body
+; SINK-AFTER: %scalar.recur = phi i16 [ %scalar.recur.init, %scalar.ph ], [ %[[LOAD:.+]], %for.body ]
+; SINK-AFTER: %[[LOAD]] = load i16, i16* %arrayidx2
+; SINK-AFTER: %[[CONV:.+]] = sext i16 %scalar.recur to i32
+; SINK-AFTER: %[[CONV3:.+]] = sext i16 %[[LOAD]] to i32
+; SINK-AFTER: %mul = mul nsw i32 %[[CONV3]], %[[CONV]]
;
define void @sink_after(i16* %a, i32* %b, i64 %n) {
entry:
OpenPOWER on IntegriCloud