Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Isl / Ast / reduction_clauses_onedimensional_access.ll
blob0c24573c194e46669c9b10a7982044f717674020
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
3 ; CHECK: #pragma known-parallel reduction (^ : sum)
4 ;        void f(int N, int M, int *sum) {
5 ;          for (int i = 0; i < N; i++)
6 ; CHECK:    #pragma simd
7 ;            for (int j = 0; j < M; j++)
8 ;              sum[j] ^= j;
9 ;        }
11 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
13 define void @f(i32 %N, i32 %M, i32* %sum) {
14 entry:
15   br label %for.cond
17 for.cond:                                         ; preds = %for.inc4, %entry
18   %i.0 = phi i32 [ 0, %entry ], [ %inc5, %for.inc4 ]
19   %cmp = icmp slt i32 %i.0, %N
20   br i1 %cmp, label %for.body, label %for.end6
22 for.body:                                         ; preds = %for.cond
23   br label %for.cond1
25 for.cond1:                                        ; preds = %for.inc, %for.body
26   %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
27   %cmp2 = icmp slt i32 %j.0, %M
28   br i1 %cmp2, label %for.body3, label %for.end
30 for.body3:                                        ; preds = %for.cond1
31   %arrayidx = getelementptr inbounds i32, i32* %sum, i32 %j.0
32   %tmp = load i32* %arrayidx, align 4
33   %xor = xor i32 %tmp, %j.0
34   store i32 %xor, i32* %arrayidx, align 4
35   br label %for.inc
37 for.inc:                                          ; preds = %for.body3
38   %inc = add nsw i32 %j.0, 1
39   br label %for.cond1
41 for.end:                                          ; preds = %for.cond1
42   br label %for.inc4
44 for.inc4:                                         ; preds = %for.end
45   %inc5 = add nsw i32 %i.0, 1
46   br label %for.cond
48 for.end6:                                         ; preds = %for.cond
49   ret void