summaryrefslogtreecommitdiffstats
path: root/polly/test/ForwardOpTree/forward_load_fromloop.ll
diff options
context:
space:
mode:
Diffstat (limited to 'polly/test/ForwardOpTree/forward_load_fromloop.ll')
-rw-r--r--polly/test/ForwardOpTree/forward_load_fromloop.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/polly/test/ForwardOpTree/forward_load_fromloop.ll b/polly/test/ForwardOpTree/forward_load_fromloop.ll
index ef24924fd37..511df986949 100644
--- a/polly/test/ForwardOpTree/forward_load_fromloop.ll
+++ b/polly/test/ForwardOpTree/forward_load_fromloop.ll
@@ -1,5 +1,19 @@
; RUN: opt %loadPolly -polly-optree -analyze < %s | FileCheck %s -match-full-lines
;
+; Forward a the LoadInst %val into %bodyB. %val is executed multiple times,
+; we must get the last loaded values.
+;
+; for (int j = 0; j < n; j += 1) {
+; double val;
+; for (int i = 0; i < n; i += 1) {
+; bodyA:
+; val = B[j];
+; }
+;
+; bodyB:
+; A[j] = val;
+; }
+;
define void @func(i32 %n, double* noalias nonnull %A, double* noalias nonnull %B) {
entry:
br label %for
OpenPOWER on IntegriCloud