1 ; RUN: opt -basic-aa %loadPolly -polly-stmt-granularity=bb -polly-print-scops -polly-disable-multiplicative-reductions -disable-output < %s | FileCheck %s
3 ; CHECK: ReadAccess := [Reduction Type: +
4 ; CHECK: { Stmt_for_body[i0] -> MemRef_sum[0] };
5 ; CHECK: MustWriteAccess := [Reduction Type: +
6 ; CHECK: { Stmt_for_body[i0] -> MemRef_sum[0] };
7 ; CHECK: ReadAccess := [Reduction Type: NONE
8 ; CHECK: { Stmt_for_body[i0] -> MemRef_prod[0] };
9 ; CHECK: MustWriteAccess := [Reduction Type: NONE
10 ; CHECK: { Stmt_for_body[i0] -> MemRef_prod[0] };
16 ; for (int i = 0; i < 100; i++) {
21 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
23 @sum = common global i32 0, align 4
24 @prod = common global i32 0, align 4
30 for.cond: ; preds = %for.inc, %entry
31 %i1.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
32 %exitcond = icmp ne i32 %i1.0, 100
33 br i1 %exitcond, label %for.body, label %for.end
35 for.body: ; preds = %for.cond
36 %mul = mul nsw i32 %i1.0, 3
37 %tmp = load i32, ptr @sum, align 4
38 %add = add nsw i32 %tmp, %mul
39 store i32 %add, ptr @sum, align 4
40 %add2 = add nsw i32 %i1.0, 3
41 %tmp1 = load i32, ptr @prod, align 4
42 %mul3 = mul nsw i32 %tmp1, %add2
43 store i32 %mul3, ptr @prod, align 4
46 for.inc: ; preds = %for.body
47 %inc = add nsw i32 %i1.0, 1
50 for.end: ; preds = %for.cond