1 ; RUN: opt %loadPolly -polly-print-scops -polly-invariant-load-hoisting=true -polly-ignore-aliasing -disable-output < %s | FileCheck %s
3 ; CHECK: Invariant Accesses:
4 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
5 ; CHECK-NEXT: [N] -> { Stmt_bb5[i0] -> MemRef_BP[0] };
6 ; CHECK-NEXT: Execution Context: [N] -> { : N >= 514 }
8 ; void f(int *BP, int *A, int N) {
9 ; for (int i = 0; i < N; i++)
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 define void @f(ptr %BP, ptr %A, i32 %N) {
20 %tmp = sext i32 %N to i64
23 bb1: ; preds = %bb11, %bb
24 %indvars.iv = phi i64 [ %indvars.iv.next, %bb11 ], [ 0, %bb ]
25 %tmp2 = icmp slt i64 %indvars.iv, %tmp
26 br i1 %tmp2, label %bb3, label %bb12
29 %tmp4 = icmp sgt i64 %indvars.iv, 512
30 br i1 %tmp4, label %bb5, label %bb8
33 %tmp9a = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
34 %inv = load i32, ptr %BP
35 store i32 %inv, ptr %tmp9a, align 4
39 %tmp9b = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
40 store i32 0, ptr %tmp9b, align 4
43 bb10: ; preds = %bb8, %bb5
47 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1