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 pr18308.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr18308.s > pr18308.ll
6 ; ModuleID = 'pr18308.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 @bar(i32 %j) nounwind uwtable {
14 for.cond: ; preds = %for.inc, %entry
15 %tmp = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
16 %k.0 = phi i32 [ 0, %entry ], [ %k.1, %for.inc ]
17 %exitcond = icmp ne i32 %tmp, 2
18 br i1 %exitcond, label %for.body, label %for.end
20 for.body: ; preds = %for.cond
21 %tobool = icmp eq i32 %j, 0
22 br i1 %tobool, label %if.end, label %if.then
24 if.then: ; preds = %for.body
27 if.end: ; preds = %for.body, %if.then
28 %k.1 = phi i32 [ 2, %if.then ], [ %k.0, %for.body ]
31 for.inc: ; preds = %if.end
32 %inc = add nsw i32 %tmp, 1
35 for.end: ; preds = %for.cond
36 %k.0.lcssa = phi i32 [ %k.0, %for.cond ]
37 %tobool4 = icmp eq i32 %k.0.lcssa, 0
38 br i1 %tobool4, label %if.end6, label %if.then5
40 if.then5: ; preds = %for.end
41 call void (...)* @foo() nounwind
44 if.end6: ; preds = %for.end, %if.then5
48 declare void @foo(...)