1 ; RUN: opt -basic-aa %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
4 ; CHECK: Reduction Type: NONE
6 ; CHECK: Reduction Type: NONE
9 ; CHECK: Reduction Type: +
10 ; CHECK: MemRef_sum_12
11 ; CHECK: Reduction Type: NONE
13 ; CHECK: Reduction Type: +
14 ; CHECK: MemRef_sum_12
15 ; CHECK: Stmt_for_inc5
16 ; CHECK: Reduction Type: NONE
17 ; CHECK: MemRef_sum_12
18 ; CHECK: Reduction Type: NONE
19 ; CHECK: MemRef_sum_04
21 ; int f(int * __restrict__ A) {
23 ; for (i = 0; i < 100; i++) {
25 ; for (j = 0; j < 100; j++) {
31 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
33 define i32 @f(ptr noalias %A) {
35 %sum.04.reg2mem = alloca i32
36 %sum.12.reg2mem = alloca i32
39 entry.split: ; preds = %entry
40 store i32 0, ptr %sum.04.reg2mem
43 for.body: ; preds = %for.inc5, %entry.split
44 %indvars.iv23 = phi i64 [ 0, %entry.split ], [ %3, %for.inc5 ]
45 %sum.04.reload = load i32, ptr %sum.04.reg2mem
46 %mul = mul nsw i32 %sum.04.reload, 7
47 store i32 %mul, ptr %sum.12.reg2mem
50 for.inc: ; preds = %for.inc, %for.body
51 %indvars.iv1 = phi i64 [ 0, %for.body ], [ %1, %for.inc ]
52 %sum.12.reload = load i32, ptr %sum.12.reg2mem
53 %0 = add i64 %indvars.iv23, %indvars.iv1
54 %arrayidx = getelementptr i32, ptr %A, i64 %0
55 %tmp5 = load i32, ptr %arrayidx, align 4
56 %add4 = add nsw i32 %tmp5, %sum.12.reload
57 %1 = add nuw nsw i64 %indvars.iv1, 1
58 %exitcond1 = icmp eq i64 %1, 100
59 store i32 %add4, ptr %sum.12.reg2mem
60 br i1 %exitcond1, label %for.inc5, label %for.inc
62 for.inc5: ; preds = %for.inc
63 %2 = load i32, ptr %sum.12.reg2mem
64 %3 = add nuw nsw i64 %indvars.iv23, 1
65 %exitcond2 = icmp eq i64 %3, 100
66 store i32 %2, ptr %sum.04.reg2mem
67 br i1 %exitcond2, label %for.end7, label %for.body
69 for.end7: ; preds = %for.inc5
70 %4 = load i32, ptr %sum.04.reg2mem