[polly] r250435 - test: Correctly check for branch statements

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 11:04:20 PDT 2015


Author: grosser
Date: Thu Oct 15 13:04:20 2015
New Revision: 250435

URL: http://llvm.org/viewvc/llvm-project?rev=250435&view=rev
Log:
test: Correctly check for branch statements

In r250408 'CHECK-NEXT: br' lines were removed as they also matched a
'%polly.subregion.iv.inc' instruction and did consequently not check what they
were supposed to check. However, without these lines we can not test that the
.s2a instructions that are not any more generated since r250411 really are not
emitted. Hence, we add back the CHECK-NEXT lines to ensure there are really no
instructions generated between the store that we check for and the branch at the
end of the basic block. To ensure we do not match too early, we now check for
'br i1' or 'br label'.

Modified:
    polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll
    polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-4.ll

Modified: polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll?rev=250435&r1=250434&r2=250435&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll Thu Oct 15 13:04:20 2015
@@ -18,18 +18,22 @@ loop:
 ; CHECK-NEXT: %p_val1 = fadd float 1.000000e+00, 2.000000e+00
 ; CHECK-NEXT: %p_val2 = fadd float 1.000000e+00, 2.000000e+00
 ; CHECK-NEXT: store float %p_val0, float* %merge.phiops
+; CHECK-NEXT: %polly.subregion.iv.inc = add i32 %polly.subregion.iv, 1
+; CHECK-NEXT: br i1
 
 branch1:
   br i1 %cond1, label %branch2, label %backedge
 
 ; CHECK-LABEL: polly.stmt.branch1:
 ; CHECK-NEXT:    store float %p_val1, float* %merge.phiops
+; CHECK-NEXT: br i1
 
 branch2:
   br label %backedge
 
 ; CHECK-LABEL: polly.stmt.branch2:
 ; CHECK-NEXT:    store float %p_val2, float* %merge.phiops
+; CHECK-NEXT:    br label
 
 backedge:
   %merge = phi float [%val0, %loop], [%val1, %branch1], [%val2, %branch2]

Modified: polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-4.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-4.ll?rev=250435&r1=250434&r2=250435&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-4.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-4.ll Thu Oct 15 13:04:20 2015
@@ -16,6 +16,8 @@ loop:
 ; CHECK-NEXT:    %p_val0 = fadd float 1.000000e+00, 2.000000e+00
 ; CHECK-NEXT:    %p_val1 = fadd float 1.000000e+00, 2.000000e+00
 ; CHECK-NEXT:    store float %p_val0, float* %merge.phiops
+; CHECK-NEXT:    %polly.subregion.iv.inc = add i32 %polly.subregion.iv, 1
+; CHECK-NEXT:    br i1
 
 ; The interesting instruction here is %val2, which does not dominate the exit of
 ; the non-affine region. Care needs to be taken when code-generating this write.
@@ -28,12 +30,14 @@ branch1:
 ; CHECK-LABEL: polly.stmt.branch1:
 ; CHECK-NEXT:    %p_val2 = fadd float 1.000000e+00, 2.000000e+00
 ; CHECK-NEXT:    store float %p_val1, float* %merge.phiops
+; CHECK-NEXT:    br i1
 
 branch2:
   br label %backedge
 
 ; CHECK-LABEL: polly.stmt.branch2:
 ; CHECK-NEXT:    store float %p_val2, float* %merge.phiops
+; CHECK-NEXT:    br label
 
 backedge:
   %merge = phi float [%val0, %loop], [%val1, %branch1], [%val2, %branch2]




More information about the llvm-commits mailing list