summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
diff options
context:
space:
mode:
authorDaniel Neilson <dneilson@azul.com>2018-05-01 15:35:08 +0000
committerDaniel Neilson <dneilson@azul.com>2018-05-01 15:35:08 +0000
commit9e4bbe801a79030934627ceafca79c75f45eb58a (patch)
tree007da645eaf7badfa0b4afe87e1c79c05347a22f /llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
parent969d63ea8c5820d1325ad27205fc34c4f5030a54 (diff)
downloadbcm5719-llvm-9e4bbe801a79030934627ceafca79c75f45eb58a.tar.gz
bcm5719-llvm-9e4bbe801a79030934627ceafca79c75f45eb58a.zip
[LV] Preserve inbounds on created GEPs
Summary: This is a fix for PR23997. The loop vectorizer is not preserving the inbounds property of GEPs that it creates. This is inhibiting some optimizations. This patch preserves the inbounds property in the case where a load/store is being fed by an inbounds GEP. Reviewers: mkuper, javed.absar, hsaito Reviewed By: hsaito Subscribers: dcaballe, hsaito, llvm-commits Differential Revision: https://reviews.llvm.org/D46191 llvm-svn: 331269
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll')
-rw-r--r--llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll b/llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
index 5d730685f3e..2d8e9afbb91 100644
--- a/llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
+++ b/llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
@@ -245,7 +245,7 @@ for.body: ; preds = %for.body, %entry
; CHECK-LABEL: @test_reversed_load2_store2(
; CHECK: %[[G0:.+]] = getelementptr inbounds %struct.ST2, %struct.ST2* %A, i64 %offset.idx, i32 0
-; CHECK: %[[G1:.+]] = getelementptr i32, i32* %[[G0]], i64 -6
+; CHECK: %[[G1:.+]] = getelementptr inbounds i32, i32* %[[G0]], i64 -6
; CHECK: %[[B0:.+]] = bitcast i32* %[[G1]] to <8 x i32>*
; CHECK: %wide.vec = load <8 x i32>, <8 x i32>* %[[B0]], align 4
; CHECK: shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
@@ -255,7 +255,7 @@ for.body: ; preds = %for.body, %entry
; CHECK: add nsw <4 x i32>
; CHECK: sub nsw <4 x i32>
; CHECK: %[[G2:.+]] = getelementptr inbounds %struct.ST2, %struct.ST2* %B, i64 %offset.idx, i32 1
-; CHECK: %[[G3:.+]] = getelementptr i32, i32* %[[G2]], i64 -7
+; CHECK: %[[G3:.+]] = getelementptr inbounds i32, i32* %[[G2]], i64 -7
; CHECK: %[[B1:.+]] = bitcast i32* %[[G3]] to <8 x i32>*
; CHECK: shufflevector <4 x i32> {{.*}}, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
; CHECK: shufflevector <4 x i32> {{.*}}, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
OpenPOWER on IntegriCloud