1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s | FileCheck %s
3 ; FIXME: We cannot detect this SCoP yet but as soon as we can we should check
4 ; that the reduction is detected!
6 ; CHECK-NOT: Scattering
9 ; for (int i = 0; i < 1024; i++)
13 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
15 define void @f(i32* %A) {
19 for.cond: ; preds = %for.inc, %entry
20 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
21 %exitcond = icmp ne i32 %i.0, 1024
22 br i1 %exitcond, label %for.body, label %for.end
24 for.body: ; preds = %for.cond
25 %rem = srem i32 %i.0, 2
26 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %rem
27 %tmp = load i32* %arrayidx, align 4
28 %add = add nsw i32 %tmp, %i.0
29 store i32 %add, i32* %arrayidx, align 4
32 for.inc: ; preds = %for.body
33 %inc = add nsw i32 %i.0, 1
36 for.end: ; preds = %for.cond