1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; CHECK: Reduction Type: NONE
7 ; for (int i = 0; i < 1024; i++)
11 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
13 @c = common global i32 0, align 4
14 @d = common global i32 0, align 4
16 define void @loads_outside_scop(ptr %sum) {
18 %tmp = load i32, ptr @c, align 4
19 %tmp1 = load i32, ptr @d, align 4
22 for.cond: ; preds = %for.inc, %entry
23 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
24 %exitcond = icmp ne i32 %i.0, 1024
25 br i1 %exitcond, label %for.body, label %for.end
27 for.body: ; preds = %for.cond
28 %add = add nsw i32 %tmp, %tmp1
29 store i32 %add, ptr %sum, align 4
32 for.inc: ; preds = %for.body
33 %inc = add nsw i32 %i.0, 1
36 for.end: ; preds = %for.cond
41 define void @binop_outside_scop(ptr %sum) {
43 %tmp = load i32, ptr @c, align 4
44 %tmp1 = load i32, ptr @d, align 4
45 %add = add nsw i32 %tmp, %tmp1
48 for.cond: ; preds = %for.inc, %entry
49 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
50 %exitcond = icmp ne i32 %i.0, 1024
51 br i1 %exitcond, label %for.body, label %for.end
53 for.body: ; preds = %for.cond
54 store i32 %add, ptr %sum, align 4
57 for.inc: ; preds = %for.body
58 %inc = add nsw i32 %i.0, 1
61 for.end: ; preds = %for.cond