1 ; RUN: opt %loadPolly -polly-print-scops -polly-invariant-load-hoisting=true -polly-process-unprofitable -disable-output < %s | FileCheck %s
2 ; RUN: opt %loadPolly -polly-print-function-scops -polly-invariant-load-hoisting=true -polly-process-unprofitable -disable-output < %s | FileCheck %s
4 ; CHECK: Invariant Accesses:
5 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
6 ; CHECK-NEXT: { Stmt_bb1[i0] -> MemRef_UB[0] };
8 ; void f(int *A, int *UB) {
9 ; for (int i = 0; i < *UB; i++)
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 define void @f(ptr %A, ptr %UB) {
19 bb1: ; preds = %bb6, %bb
20 %indvars.iv = phi i64 [ %indvars.iv.next, %bb6 ], [ 0, %bb ]
21 %tmp = load i32, ptr %UB, align 4
22 %tmp2 = sext i32 %tmp to i64
23 %tmp3 = icmp slt i64 %indvars.iv, %tmp2
24 br i1 %tmp3, label %bb4, label %bb7
27 %tmp5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
28 store i32 0, ptr %tmp5, align 4
32 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1