1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2
3target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-a0:0-n32"
4
5@array = external global [64 x i8], align 8
6
7define void @foo(i32* %A) nounwind {
8entry:
9  br label %if.then132
10
11if.then132:
12  %loaded = load i32, i32* %A
13  %0 = icmp ugt i32 %loaded, 10
14  %umax = select i1 %0, i32 %loaded, i32 10
15  br label %do.body
16
17do.body:
18  %indvar = phi i32 [ %3, %do.body ], [ 0, %if.then132 ]
19  %1 = add i32 0, %umax
20  %2 = sub i32 %1, %indvar
21  %arrayidx = getelementptr [64 x i8], [64 x i8]* @array, i32 0, i32 %2
22  store i8 1, i8* %arrayidx, align 1
23  %3 = add i32 %indvar, 1
24  %exitcond = icmp eq i32 %3, 20
25  br i1 %exitcond, label %for.end, label %do.body
26
27for.end:
28  ret void
29}
30
31;CHECK: p0: (10 umax %loaded)
32