[polly] r258496 - Remove irreducible control flow from test case
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 01:33:33 PST 2016
Author: grosser
Date: Fri Jan 22 03:33:33 2016
New Revision: 258496
URL: http://llvm.org/viewvc/llvm-project?rev=258496&view=rev
Log:
Remove irreducible control flow from test case
The test case we look at does not necessarily require irreducible control flow,
but a normal loop is sufficient to create a non-affine region containing more
than one basic block that dominates the exit node. We replace this irreducible
control flow with a normal loop for the following reasons:
1) This is easier to understand
2) We will subsequently commit a patch that ensures Polly does not process
irreducible control flow.
Within non-affine regions, we could possibly handle irreducible control flow.
Modified:
polly/trunk/test/ScopInfo/NonAffine/non_affine_region_guaranteed_non-entry.ll
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_region_guaranteed_non-entry.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_region_guaranteed_non-entry.ll?rev=258496&r1=258495&r2=258496&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_region_guaranteed_non-entry.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_region_guaranteed_non-entry.ll Fri Jan 22 03:33:33 2016
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-detect -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-detect -polly-scops -analyze \
+; RUN: -polly-allow-nonaffine-loops < %s | FileCheck %s
; The BasicBlock "guaranteed" is always executed inside the non-affine subregion
; region_entry->region_exit. As such, writes accesses in blocks that always
@@ -10,7 +11,7 @@
; CHECK-NEXT: { Stmt_region_entry__TO__region_exit[i0] -> MemRef_A[0] };
; CHECK-NOT: MayWriteAccess
-define void @f(i32* %A, float %b) {
+define void @f(i32* %A, i32* %B, i32* %C, float %b) {
entry:
br label %for.cond
@@ -20,24 +21,29 @@ for.cond:
br i1 %exitcond, label %region_entry, label %return
region_entry:
- %cond_entry = fcmp oeq float %b, 3.0
- br i1 %cond_entry, label %bb2, label %bb3
+ br label %bb2
bb2:
br label %guaranteed
bb3:
- br label %guaranteed
+ br label %bb3
guaranteed:
+ %ptr = getelementptr i32, i32* %B, i32 %indvar
+ %val = load i32, i32* %ptr
+ %cmp = icmp eq i32 %val, 0
store i32 0, i32* %A
- br i1 %cond_entry, label %bb5, label %bb6
+ br i1 %cmp, label %bb5, label %bb6
bb5:
br label %region_exit
bb6:
- br i1 %cond_entry, label %region_exit, label %bb3
+ %ptr2 = getelementptr i32, i32* %C, i32 %indvar
+ %val2 = load i32, i32* %ptr2
+ %cmp2 = icmp eq i32 %val2, 0
+ br i1 %cmp2, label %region_exit, label %region_entry
region_exit:
br label %for.inc
More information about the llvm-commits
mailing list