[llvm-branch-commits] [polly] r183384 - Test that independent block pass does not transform induction variables

Tobias Grosser grosser at fim.uni-passau.de
Wed Jun 5 19:49:52 PDT 2013


Author: grosser
Date: Wed Jun  5 21:49:02 2013
New Revision: 183384

URL: http://llvm.org/viewvc/llvm-project?rev=183384&view=rev
Log:
Test that independent block pass does not transform induction variables

The original test case showed a problem with the independet blocks pass and
we decided to XFAIL it for now. Unfortunately the failure is not detected if
we build without asserts and the verification of the independent block pass
is not run. This change tests now for the actual reason of the failure and
should trigger even in a non asserts build. We did not yet solve the underlying
bug, but this should at least make the test suite behavior consistent.

Merged from: https://llvm.org/svn/llvm-project/polly/trunk@183025

Added:
    polly/branches/release_33/test/IndependentBlocks/indvars.ll
Removed:
    polly/branches/release_33/test/Isl/CodeGen/scevcodegen-1.ll

Added: polly/branches/release_33/test/IndependentBlocks/indvars.ll
URL: http://llvm.org/viewvc/llvm-project/polly/branches/release_33/test/IndependentBlocks/indvars.ll?rev=183384&view=auto
==============================================================================
--- polly/branches/release_33/test/IndependentBlocks/indvars.ll (added)
+++ polly/branches/release_33/test/IndependentBlocks/indvars.ll Wed Jun  5 21:49:02 2013
@@ -0,0 +1,39 @@
+; RUN: opt %loadPolly -polly-independent -polly-codegen-scev %s | FileCheck %s
+; XFAIL: *
+;
+; Ensure that the independent block pass does not invalidate the induction
+; variable here.
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @main() nounwind {
+entry:
+  br label %for.i
+
+for.i:
+  %indvar.i = phi i64 [ 0, %entry ], [ %indvar.next.i, %for.i.backedge ]
+  br i1 true, label %for.j.preheader, label %for.j2
+
+for.j.preheader:
+  br label %for.j
+
+for.j:
+  %indvar.j = phi i64 [ %indvar.next.j, %for.j ], [ 0, %for.j.preheader ]
+  %indvar.next.j = add i64 %indvar.j, 1
+  %exitcond.j = icmp eq i64 %indvar.next.j, 0
+  br i1 %exitcond.j, label %for.j2, label %for.j
+
+for.j2:
+  fence seq_cst
+  br label %for.i.backedge
+
+for.i.backedge:
+  %indvar.next.i = add i64 %indvar.i, 1
+  %exitcond.i = icmp eq i64 %indvar.next.i, 2048
+  br i1 %exitcond.i, label %for.i, label %.end
+
+.end:
+  ret void
+}
+
+; CHECK: %indvar.j = phi i64 [ %indvar.next.j, %for.j ], [ 0, %for.j.preheader ]

Removed: polly/branches/release_33/test/Isl/CodeGen/scevcodegen-1.ll
URL: http://llvm.org/viewvc/llvm-project/polly/branches/release_33/test/Isl/CodeGen/scevcodegen-1.ll?rev=183383&view=auto
==============================================================================
--- polly/branches/release_33/test/Isl/CodeGen/scevcodegen-1.ll (original)
+++ polly/branches/release_33/test/Isl/CodeGen/scevcodegen-1.ll (removed)
@@ -1,37 +0,0 @@
-; RUN: opt %loadPolly -polly-codegen-isl -polly-codegen-scev %s
-; -polly-independent causes: Cannot generate independent blocks
-;
-; XFAIL:*
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-unknown-linux-gnu"
-
-define void @main() nounwind {
-.split:
-  br label %.start
-
-.start:
-  %indvar15 = phi i64 [ 0, %.split ], [ %indvar.next16, %.loopexit ]
-  %tmp25 = add i64 %indvar15, 1
-  br i1 true, label %.preheader, label %.loop2
-
-.preheader:
-  br label %.loop1
-
-.loop1:
-  %indvar33 = phi i64 [ %indvar.next34, %.loop1 ], [ 0, %.preheader ]
-  %indvar.next34 = add i64 %indvar33, 1
-  %exitcond40 = icmp eq i64 %indvar.next34, 0
-  br i1 %exitcond40, label %.loop2, label %.loop1
-
-.loop2:
-  %exitcond26.old = icmp eq i64 undef, %tmp25
-  br i1 false, label %.loopexit, label %.loop2
-
-.loopexit:
-  %indvar.next16 = add i64 %indvar15, 1
-  %exitcond53 = icmp eq i64 %indvar.next16, 2048
-  br i1 %exitcond53, label %.start, label %.end
-
-.end:
-  ret void
-}





More information about the llvm-branch-commits mailing list