Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / ScopInfo / reduction_invalid_overlapping_accesses.ll
blob6b7be71dc5be7f5a6422e886e82e7b3952e5191e
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s | FileCheck %s
3 ; void f(int *sums) {
4 ;   int i, j;
5 ;   for (i = 0; i < 1024; i++) {
6 ;     for (j = 0; j < 1024; j++) {
7 ;       sums[i] += 5;
8 ;       sums[i+10] *= 5;
9 ;     }
10 ;   }
11 ; }
13 ; CHECK-NOT: Reduction Type: +
14 ; CHECK-NOT: Reduction Type: *
15 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
17 define void @f(i32* %sums) {
18 entry:
19   br label %for.cond
21 for.cond:                                         ; preds = %for.inc6, %entry
22   %i.0 = phi i32 [ 0, %entry ], [ %inc7, %for.inc6 ]
23   %exitcond1 = icmp ne i32 %i.0, 1024
24   br i1 %exitcond1, label %for.body, label %for.end8
26 for.body:                                         ; preds = %for.cond
27   br label %for.cond1
29 for.cond1:                                        ; preds = %for.inc, %for.body
30   %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
31   %exitcond = icmp ne i32 %j.0, 1024
32   br i1 %exitcond, label %for.body3, label %for.end
34 for.body3:                                        ; preds = %for.cond1
35   %arrayidx = getelementptr inbounds i32, i32* %sums, i32 %i.0
36   %tmp = load i32* %arrayidx, align 4
37   %add = add nsw i32 %tmp, 5
38   store i32 %add, i32* %arrayidx, align 4
39   %add4 = add nsw i32 %i.0, 10
40   %arrayidx5 = getelementptr inbounds i32, i32* %sums, i32 %add4
41   %tmp2 = load i32* %arrayidx5, align 4
42   %mul = mul nsw i32 %tmp2, 5
43   store i32 %mul, i32* %arrayidx5, align 4
44   br label %for.inc
46 for.inc:                                          ; preds = %for.body3
47   %inc = add nsw i32 %j.0, 1
48   br label %for.cond1
50 for.end:                                          ; preds = %for.cond1
51   br label %for.inc6
53 for.inc6:                                         ; preds = %for.end
54   %inc7 = add nsw i32 %i.0, 1
55   br label %for.cond
57 for.end8:                                         ; preds = %for.cond
58   ret void