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 no-scevccp-outer-2.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer no-scevccp-outer-2.s > no-scevccp-outer-2.ll
6 ; ModuleID = 'no-scevccp-outer-2.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 i32 @foo() nounwind uwtable {
14 for.cond: ; preds = %for.inc8, %entry
15 %tmp = phi i32 [ 0, %entry ], [ %inc10, %for.inc8 ]
16 %exitcond1 = icmp ne i32 %tmp, 40
17 br i1 %exitcond1, label %for.body, label %for.end11
19 for.body: ; preds = %for.cond
22 for.cond1: ; preds = %for.inc, %for.body
23 %tmp2 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
24 %exitcond = icmp ne i32 %tmp2, 40
25 br i1 %exitcond, label %for.body4, label %for.end
27 for.body4: ; preds = %for.cond1
30 for.inc: ; preds = %for.body4
31 %inc = add nsw i32 %tmp2, 1
34 for.end: ; preds = %for.cond1
37 for.inc8: ; preds = %for.end
38 %inc10 = add nsw i32 %tmp, 1
41 for.end11: ; preds = %for.cond