summaryrefslogtreecommitdiffstats
path: root/polly/test/Isl
diff options
context:
space:
mode:
authorSiddharth Bhat <siddu.druid@gmail.com>2017-07-13 12:18:56 +0000
committerSiddharth Bhat <siddu.druid@gmail.com>2017-07-13 12:18:56 +0000
commita1b2086a33dbfe4bea86acbb77611ffafd6245f1 (patch)
tree18aabf3768a1e3ed1d89424db71b720cbd131ad4 /polly/test/Isl
parent250256f9c95750ad63ee5a2d22cc6a22380ec9e9 (diff)
downloadbcm5719-llvm-a1b2086a33dbfe4bea86acbb77611ffafd6245f1.tar.gz
bcm5719-llvm-a1b2086a33dbfe4bea86acbb77611ffafd6245f1.zip
[Invariant Loads] Do not consider invariant loads to have dependences.
We need to relax constraints on invariant loads so that they do not create fake RAW dependences. So, we do not consider invariant loads as scalar dependences in a region. During these changes, it turned out that we do not consider `llvm::Value` replacements correctly within `PPCGCodeGeneration` and `ISLNodeBuilder`. The replacements dictated by `ValueMap` were not being followed in all places. This was fixed in this commit. There is no clean way to decouple this change because this bug only seems to arise when the relaxed version of invariant load hoisting was enabled. Differential Revision: https://reviews.llvm.org/D35120 llvm-svn: 307907
Diffstat (limited to 'polly/test/Isl')
-rw-r--r--polly/test/Isl/CodeGen/invariant_load_base_pointer.ll2
-rw-r--r--polly/test/Isl/CodeGen/invariant_load_base_pointer_conditional.ll2
-rw-r--r--polly/test/Isl/CodeGen/invariant_load_ptr_ptr_noalias.ll4
-rw-r--r--polly/test/Isl/CodeGen/invariant_load_scalar_escape_alloca_sharing.ll7
4 files changed, 4 insertions, 11 deletions
diff --git a/polly/test/Isl/CodeGen/invariant_load_base_pointer.ll b/polly/test/Isl/CodeGen/invariant_load_base_pointer.ll
index 414fa414386..6ec27d1614c 100644
--- a/polly/test/Isl/CodeGen/invariant_load_base_pointer.ll
+++ b/polly/test/Isl/CodeGen/invariant_load_base_pointer.ll
@@ -5,7 +5,7 @@
; CHECK-NEXT: %polly.access.BPLoc.load = load i32*, i32** %polly.access.BPLoc
;
; CHECK-LABEL: polly.stmt.bb2:
-; CHECK-NEXT: %p_tmp3 = getelementptr inbounds i32, i32* %polly.access.BPLoc.load, i64 %polly.indvar
+; CHECK-NEXT: %scevgep = getelementptr i32, i32* %polly.access.BPLoc.load, i64 %polly.indvar
;
; void f(int **BPLoc) {
; for (int i = 0; i < 1024; i++)
diff --git a/polly/test/Isl/CodeGen/invariant_load_base_pointer_conditional.ll b/polly/test/Isl/CodeGen/invariant_load_base_pointer_conditional.ll
index 3e9e1a62979..987a3ba49dd 100644
--- a/polly/test/Isl/CodeGen/invariant_load_base_pointer_conditional.ll
+++ b/polly/test/Isl/CodeGen/invariant_load_base_pointer_conditional.ll
@@ -12,7 +12,7 @@
; CHECK-NEXT: %polly.preload.tmp6.merge = phi i32* [ %polly.access.BPLoc.load, %polly.preload.exec ], [ null, %polly.preload.cond ]
;
; CHECK-LABEL: polly.stmt.bb5:
-; CHECK-NEXT: %p_tmp7 = getelementptr inbounds i32, i32* %polly.preload.tmp6.merge, i64 %polly.indvar6
+; CHECK-NEXT: %scevgep9 = getelementptr i32, i32* %polly.preload.tmp6.merge, i64 %polly.indvar6
;
; void f(int **BPLoc, int *A, int N) {
; for (int i = 0; i < N; i++)
diff --git a/polly/test/Isl/CodeGen/invariant_load_ptr_ptr_noalias.ll b/polly/test/Isl/CodeGen/invariant_load_ptr_ptr_noalias.ll
index 5ddc7e51ed2..5b84a91b902 100644
--- a/polly/test/Isl/CodeGen/invariant_load_ptr_ptr_noalias.ll
+++ b/polly/test/Isl/CodeGen/invariant_load_ptr_ptr_noalias.ll
@@ -7,8 +7,8 @@
; CHECK: %polly.access.polly.access.A.load.load = load i32*, i32** %polly.access.polly.access.A.load
;
; CHECK: polly.stmt.bb2:
-; CHECK: %p_tmp6 = getelementptr inbounds i32, i32* %polly.access.polly.access.A.load.load, i64 %polly.indvar
-; CHECK: store i32 0, i32* %p_tmp6, align 4
+; CHECK: %scevgep = getelementptr i32, i32* %polly.access.polly.access.A.load.load, i64 %polly.indvar
+; CHECK: store i32 0, i32* %scevgep, align 4
;
; void f(int ***A) {
; for (int i = 0; i < 1024; i++)
diff --git a/polly/test/Isl/CodeGen/invariant_load_scalar_escape_alloca_sharing.ll b/polly/test/Isl/CodeGen/invariant_load_scalar_escape_alloca_sharing.ll
index 2393f950069..212792afd6f 100644
--- a/polly/test/Isl/CodeGen/invariant_load_scalar_escape_alloca_sharing.ll
+++ b/polly/test/Isl/CodeGen/invariant_load_scalar_escape_alloca_sharing.ll
@@ -5,19 +5,12 @@
; instead use directly the preloaded value stored in GlobalMap.
;
; CHECK-NOT: alloca
-; CHECK: %dec3.s2a = alloca i32
-; CHECK-NOT: alloca
-; CHECK: %dec3.in.phiops = alloca i32
-; CHECK-NOT: alloca
; CHECK: %tmp0.preload.s2a = alloca i32
; CHECK-NOT: alloca
;
; CHECK: %ncol.load = load i32, i32* @ncol
; CHECK-NEXT: store i32 %ncol.load, i32* %tmp0.preload.s2a
;
-; CHECK: polly.stmt.while.body.lr.ph:
-; CHECK-NEXT: store i32 %ncol.load, i32* %dec3.in.phiops
-;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@ncol = external global i32, align 4
OpenPOWER on IntegriCloud