1 ; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
3 ; void f(int *A, int c, int N) {
5 ; for (int i = 0; i < N; i++) {
15 ; CHECK: %tmp.0.phiops = alloca i32
16 ; CHECK-LABEL: polly.stmt.bb8:
17 ; CHECK: %tmp.0.phiops.reload = load i32, ptr %tmp.0.phiops
18 ; CHECK: store i32 %tmp.0.phiops.reload, ptr
19 ; CHECK-LABEL: polly.stmt.bb7:
20 ; CHECK: store i32 5, ptr %tmp.0.phiops
21 ; CHECK-LABEL: polly.stmt.bb6:
22 ; CHECK: store i32 3, ptr %tmp.0.phiops
24 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 define void @f(ptr %A, i32 %c, i32 %N) {
28 %tmp = sext i32 %N to i64
29 %tmp1 = sext i32 %c to i64
32 bb2: ; preds = %bb10, %bb
33 %indvars.iv = phi i64 [ %indvars.iv.next, %bb10 ], [ 0, %bb ]
34 %tmp3 = icmp slt i64 %indvars.iv, %tmp
35 br i1 %tmp3, label %bb4, label %bb11
38 %tmp5 = icmp sgt i64 %indvars.iv, %tmp1
39 br i1 %tmp5, label %bb6, label %bb7
47 bb8: ; preds = %bb7, %bb6
48 %tmp.0 = phi i32 [ 3, %bb6 ], [ 5, %bb7 ]
49 %tmp9 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
50 store i32 %tmp.0, ptr %tmp9, align 4
54 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1