1 ; RUN: opt %loadPolly -polly-codegen \
2 ; RUN: -S < %s | FileCheck %s
4 define void @foo(ptr %A, i1 %cond0, i1 %cond1) {
9 %indvar = phi i64 [0, %entry], [%indvar.next, %backedge]
10 %val0 = fadd float 1.0, 2.0
11 %val1 = fadd float 1.0, 2.0
12 %val2 = fadd float 1.0, 2.0
13 br i1 %cond0, label %branch1, label %backedge
15 ; CHECK-LABEL: polly.stmt.loop:
16 ; CHECK-NEXT: %p_val0 = fadd float 1.000000e+00, 2.000000e+00
17 ; CHECK-NEXT: %p_val1 = fadd float 1.000000e+00, 2.000000e+00
18 ; CHECK-NEXT: %p_val2 = fadd float 1.000000e+00, 2.000000e+00
22 br i1 %cond1, label %branch2, label %backedge
24 ; CHECK-LABEL: polly.stmt.branch1:
30 ; CHECK-LABEL: polly.stmt.branch2:
31 ; CHECK-NEXT: br label
33 ; CHECK-LABEL: polly.stmt.backedge.exit:
34 ; CHECK: %polly.merge = phi float [ %p_val0, %polly.stmt.loop ], [ %p_val1, %polly.stmt.branch1 ], [ %p_val2, %polly.stmt.branch2 ]
37 %merge = phi float [%val0, %loop], [%val1, %branch1], [%val2, %branch2]
38 %indvar.next = add i64 %indvar, 1
39 store float %merge, ptr %A
40 %cmp = icmp sle i64 %indvar.next, 100
41 br i1 %cmp, label %loop, label %exit