1 ; RUN: opt %loadPolly -polly-scops -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -analyze < %s | FileCheck %s
3 ; CHECK: Invariant Accesses:
4 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
5 ; CHECK-NEXT: [N] -> { Stmt_bb5[i0] -> MemRef_BPLoc[0] };
7 ; void f(int **BPLoc, int *A, int N) {
8 ; for (int i = 0; i < N; i++)
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 define void @f(i32** %BPLoc, i32* %A, i32 %N) {
19 %tmp = sext i32 %N to i64
22 bb1: ; preds = %bb11, %bb
23 %indvars.iv = phi i64 [ %indvars.iv.next, %bb11 ], [ 0, %bb ]
24 %tmp2 = icmp slt i64 %indvars.iv, %tmp
25 br i1 %tmp2, label %bb3, label %bb12
28 %tmp4 = icmp sgt i64 %indvars.iv, 512
29 br i1 %tmp4, label %bb5, label %bb8
32 %tmp6 = load i32*, i32** %BPLoc, align 8
33 %tmp7 = getelementptr inbounds i32, i32* %tmp6, i64 %indvars.iv
34 store i32 0, i32* %tmp7, align 4
38 %tmp9 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
39 store i32 0, i32* %tmp9, align 4
42 bb10: ; preds = %bb8, %bb5
46 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1