summaryrefslogtreecommitdiffstats
path: root/polly/test/Isl/CodeGen
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-07-15 22:42:17 +0000
committerTobias Grosser <tobias@grosser.es>2017-07-15 22:42:17 +0000
commita3aa423fc34b2cb02cf9a2bf873d508f24d2f9a1 (patch)
treec87acd10af16e924648140deef052f3d299f8f18 /polly/test/Isl/CodeGen
parent0b4b4e388d551b542c2a09a17fccb77f40498700 (diff)
downloadbcm5719-llvm-a3aa423fc34b2cb02cf9a2bf873d508f24d2f9a1.tar.gz
bcm5719-llvm-a3aa423fc34b2cb02cf9a2bf873d508f24d2f9a1.zip
[ScopDetection] If a loop is not part of a scop, none of it backedges can be
This patch makes sure that in case a loop is not fully contained within a region that later forms a SCoP, none of the loop backedges are allowed to be part of the region. We currently do not support the situation where only some of a loops backedges are part of a scop. Today, this can break both scop modeling and code generation. One such breaking test case is for example test/ScopDetectionDiagnostics/loop_partially_in_scop-2.ll, where we totally forgot to code generate some of the backedges. Fortunately, it is commonly not necessary to support these partial loops, it is way more common that either no backedge is included in a region or all loop backedge are included. This fixes a recent miscompile in MultiSource/Benchmarks/MiBench/consumer-typeset which was exposed after r306477. llvm-svn: 308113
Diffstat (limited to 'polly/test/Isl/CodeGen')
-rw-r--r--polly/test/Isl/CodeGen/loop_partially_in_scop.ll49
1 files changed, 0 insertions, 49 deletions
diff --git a/polly/test/Isl/CodeGen/loop_partially_in_scop.ll b/polly/test/Isl/CodeGen/loop_partially_in_scop.ll
deleted file mode 100644
index 3cf7f1e73cb..00000000000
--- a/polly/test/Isl/CodeGen/loop_partially_in_scop.ll
+++ /dev/null
@@ -1,49 +0,0 @@
-; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
-;
-; Verify we do not crash for this test case and additionally check the code
-; that we generate for the %tmp PHI node in the non-affine region. This code
-; is difficult to generate as some incoming edges are from basic blocks
-; from within the region and others from basic blocks from outside of the
-; non-affine region. As visible in the CHECK lines, the code we generate
-; currently loads from the PHI twice in %polly.stmt.bb2.entry, which is
-; something we should avoid.
-;
-; CHECK: polly.start
-
-; CHECK: polly.stmt.bb2.entry: ; preds = %polly.start
-; CHECK-NEXT: %tmp.phiops.reload = load i32, i32* %tmp.phiops
-; CHECK-NEXT: br label %polly.stmt.bb2
-
-; CHECK: polly.stmt.bb2: ; preds = %polly.stmt.bb2, %polly.stmt.bb2.entry
-; CHECK-NEXT: %polly.tmp = phi i32 [ %tmp.phiops.reload, %polly.stmt.bb2.entry ], [ %p_tmp4, %polly.stmt.bb2 ]
-; CHECK-NEXT: %p_tmp3 = or i32 undef, undef
-; CHECK-NEXT: %p_tmp4 = udiv i32 %p_tmp3, 10
-; CHECK-NEXT: %p_tmp6 = icmp eq i8 undef, 0
-; CHECK-NEXT: br i1 %p_tmp6, label %polly.stmt.polly.merge_new_and_old.exit, label %polly.stmt.bb2
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
-define void @baz(i32 %before) {
-bb:
- br label %bb1
-
-bb1: ; preds = %bb
- br label %bb2
-
-bb2: ; preds = %bb8, %bb7, %bb2, %bb1
- %tmp = phi i32 [ %before, %bb1 ], [ 0, %bb8 ], [ %tmp4, %bb7 ], [ %tmp4, %bb2 ]
- %tmp3 = or i32 undef, undef
- %tmp4 = udiv i32 %tmp3, 10
- %tmp5 = trunc i32 undef to i8
- %tmp6 = icmp eq i8 %tmp5, 0
- br i1 %tmp6, label %bb7, label %bb2
-
-bb7: ; preds = %bb2
- br i1 undef, label %bb8, label %bb2
-
-bb8: ; preds = %bb7
- br i1 undef, label %bb9, label %bb2
-
-bb9: ; preds = %bb8
- unreachable
-}
OpenPOWER on IntegriCloud