1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 pr22506.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr22506.s > pr22506.ll
6 ; ModuleID = 'pr22506.s'
7 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"
8 target triple = "x86_64-unknown-linux-gnu"
10 @x = common global [3 x float] zeroinitializer, align 4
12 define void @foo() nounwind uwtable {
16 for.cond: ; preds = %for.inc, %entry
17 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
18 %arrayidx = getelementptr [3 x float]* @x, i64 0, i64 %indvar
19 %exitcond1 = icmp ne i64 %indvar, 5
20 br i1 %exitcond1, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 store float 0.000000e+00, float* %arrayidx, align 4
26 for.inc: ; preds = %for.body
27 %indvar.next = add i64 %indvar, 1
30 for.end: ; preds = %for.cond
33 for.cond3: ; preds = %for.inc7, %for.end
34 %tmp = phi i32 [ 0, %for.end ], [ %inc9, %for.inc7 ]
35 %exitcond = icmp ne i32 %tmp, 4
36 br i1 %exitcond, label %for.body6, label %for.end10
38 for.body6: ; preds = %for.cond3
41 for.inc7: ; preds = %for.body6
42 %inc9 = add nsw i32 %tmp, 1
45 for.end10: ; preds = %for.cond3