1 ; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-process-unprofitable -S < %s | FileCheck %s
5 ; void f(int *A, int *UB) {
6 ; for (int i = 0; i < *UB; i++)
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 define void @f(ptr %A, ptr %UB) {
16 bb1: ; preds = %bb6, %bb
17 %indvars.iv = phi i64 [ %indvars.iv.next, %bb6 ], [ 0, %bb ]
18 %tmp = load i32, ptr %UB, align 4
19 %tmp2 = sext i32 %tmp to i64
20 %tmp3 = icmp slt i64 %indvars.iv, %tmp2
21 br i1 %tmp3, label %bb4, label %bb7
24 %tmp5 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
25 store i32 0, ptr %tmp5, align 4
29 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1