[JSON][PM] Port json import/export over to new pm
[polly-mirror.git] / test / ScopInfo / parameter_with_constant_factor_in_add.ll
blobeef95410e33c518cd5bf641bec87ad542653d19d
1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
3 ; Check that the access function of the store is simple and concise
5 ; CHECK: p0: {0,+,(-1 + (sext i32 (-1 * %smax188) to i64))<nsw>}<%for.cond261.preheader>
7 ; CHECK:      MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
8 ; CHECK-NEXT:   [p_0] -> { Stmt_for_body276[i0] -> MemRef_A[p_0] };
10 ; ModuleID = 'bugpoint-reduced-simplified.bc'
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 ; Function Attrs: nounwind uwtable
14 define void @BPredPartitionCost(i32* %A) #0 {
15 entry:
16   %curr_blk = alloca [16 x [16 x i32]], align 16
17   br label %for.cond261.preheader.lr.ph
19 for.cond261.preheader.lr.ph:                      ; preds = %entry
20   %smax188 = select i1 undef, i32 undef, i32 -9
21   %0 = sub i32 0, %smax188
22   %1 = sext i32 %0 to i64
23   %2 = add i64 %1, -1
24   br label %for.cond261.preheader
26 for.cond261.preheader:                            ; preds = %for.inc299, %for.cond261.preheader.lr.ph
27   %indvars.iv189 = phi i64 [ 0, %for.cond261.preheader.lr.ph ], [ %indvars.iv.next190, %for.inc299 ]
28   br i1 undef, label %for.cond273.preheader, label %for.inc299
30 for.cond273.preheader:                            ; preds = %for.cond261.preheader
31   br label %for.body276
33 for.body276:                                      ; preds = %for.body276, %for.cond273.preheader
34   %indvars.iv = phi i64 [ 0, %for.cond273.preheader ], [ %indvars.iv.next, %for.body276 ]
35   %3 = add nsw i64 0, %indvars.iv189
36   %arrayidx282 = getelementptr inbounds [16 x [16 x i32]], [16 x [16 x i32]]* %curr_blk, i64 0, i64 %3, i64 0
37   %4 = load i32, i32* %arrayidx282, align 4
38   %arridx = getelementptr i32, i32* %A, i64 %3
39   store i32 0, i32* %arridx, align 4
40   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
41   br i1 false, label %for.body276, label %for.end291
43 for.end291:                                       ; preds = %for.body276
44   ret void
46 for.inc299:                                       ; preds = %for.cond261.preheader
47   %indvars.iv.next190 = add i64 %indvars.iv189, %2
48   br i1 undef, label %for.cond261.preheader, label %if.end302
50 if.end302:                                        ; preds = %for.inc299
51   ret void