[Polly] Gist new access relations using the SCoP context.
This simplifies the access relations.
GitOrigin-RevId: a5b895110f02c69465dfa605c036abf420c5acc3
diff --git a/lib/Analysis/ScopInfo.cpp b/lib/Analysis/ScopInfo.cpp
index 97321c0..9d2dca4 100644
--- a/lib/Analysis/ScopInfo.cpp
+++ b/lib/Analysis/ScopInfo.cpp
@@ -1109,6 +1109,7 @@
"Access dims must match array dims");
#endif
+ NewAccess = NewAccess.gist_params(getStatement()->getParent()->getContext());
NewAccess = NewAccess.gist_domain(getStatement()->getDomain());
NewAccessRelation = NewAccess;
}
diff --git a/test/DeLICM/reduction_looprotate_hoisted.ll b/test/DeLICM/reduction_looprotate_hoisted.ll
index 47f4495..abfe41b 100644
--- a/test/DeLICM/reduction_looprotate_hoisted.ll
+++ b/test/DeLICM/reduction_looprotate_hoisted.ll
@@ -70,7 +70,7 @@
; CHECK-NEXT: Stmt_reduction_preheader
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_phi__phi[] };
-; CHECK-NEXT: new: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_A[i0] : Start >= 2147483648 or Start <= 2147483646 };
+; CHECK-NEXT: new: [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_A[i0] : Start <= 2147483646 };
; CHECK-NEXT: Stmt_reduction_for
; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_phi__phi[] };
diff --git a/test/Simplify/coalesce_3partials.ll b/test/Simplify/coalesce_3partials.ll
index 7df5908..494743b 100644
--- a/test/Simplify/coalesce_3partials.ll
+++ b/test/Simplify/coalesce_3partials.ll
@@ -44,5 +44,5 @@
; CHECK-NEXT: Stmt_body
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
-; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 };
+; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
; CHECK-NEXT: }
diff --git a/test/Simplify/coalesce_disjointelements.ll b/test/Simplify/coalesce_disjointelements.ll
index 2581be6..2d07f0c 100644
--- a/test/Simplify/coalesce_disjointelements.ll
+++ b/test/Simplify/coalesce_disjointelements.ll
@@ -49,8 +49,8 @@
; CHECK-NEXT: Stmt_body
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
-; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 };
+; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[1] };
-; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[1] : n <= 2147483647 };
+; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[1] };
; CHECK-NEXT: }
diff --git a/test/Simplify/coalesce_overlapping.ll b/test/Simplify/coalesce_overlapping.ll
index 6df11e7..bcc26f0 100644
--- a/test/Simplify/coalesce_overlapping.ll
+++ b/test/Simplify/coalesce_overlapping.ll
@@ -42,5 +42,5 @@
; CHECK-NEXT: Stmt_body
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
-; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 };
+; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
; CHECK-NEXT: }
diff --git a/test/Simplify/coalesce_partial.ll b/test/Simplify/coalesce_partial.ll
index e16488a..27ed254 100644
--- a/test/Simplify/coalesce_partial.ll
+++ b/test/Simplify/coalesce_partial.ll
@@ -42,5 +42,5 @@
; CHECK-NEXT: Stmt_body
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
-; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] : n <= 2147483647 };
+; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
; CHECK-NEXT: }