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 pr25371.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr25371.s > pr25371.ll
6 ; ModuleID = 'pr25371.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 define void @slow_close(i32 %n) nounwind uwtable {
13 %tmp1 = icmp sgt i32 %tmp, 0
14 %smax = select i1 %tmp1, i32 %tmp, i32 0
17 for.cond: ; preds = %for.inc17, %entry
18 %i.0 = phi i32 [ 0, %entry ], [ %inc19, %for.inc17 ]
19 %mul = shl nsw i32 %n, 1
20 %cmp = icmp slt i32 %i.0, %mul
21 br i1 %cmp, label %for.body, label %for.end20
23 for.body: ; preds = %for.cond
26 for.cond2: ; preds = %for.inc, %for.body
27 %tmp2 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
28 %exitcond = icmp ne i32 %tmp2, %smax
29 br i1 %exitcond, label %for.body7, label %for.end
31 for.body7: ; preds = %for.cond2
32 store double 0.000000e+00, double* undef, align 8
35 for.inc: ; preds = %for.body7
36 %inc = add nsw i32 %tmp2, 1
39 for.end: ; preds = %for.cond2
42 for.inc17: ; preds = %for.end
43 %inc19 = add nsw i32 %smax, 1
46 for.end20: ; preds = %for.cond