1 ; RUN: opt %loadPolly -polly-codegen -S \
2 ; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
5 ; CHECK-NEXT: %outvalue.141.phiops = alloca i64
6 ; CHECK-NEXT: %.preload.s2a = alloca i8
7 ; CHECK-NEXT: %umax = call i32 @llvm.umax.i32(i32 undef, i32 1)
8 ; CHECK-NEXT: %divpolly = sdiv i32 undef, %umax
9 ; CHECK-NEXT: %div = sdiv i32 undef, undef
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 ; Function Attrs: nounwind uwtable
14 define void @int_downsample() #0 {
16 %div = sdiv i32 undef, undef
17 br label %for.cond10.preheader.lr.ph
19 for.cond10.preheader.lr.ph: ; preds = %entry
20 br label %for.body17.lr.ph
22 for.body17.lr.ph: ; preds = %for.end22, %for.cond10.preheader.lr.ph
23 %outcol_h.048 = phi i32 [ 0, %for.cond10.preheader.lr.ph ], [ %add31, %for.end22 ]
24 %0 = load ptr, ptr undef
25 %idx.ext = zext i32 %outcol_h.048 to i64
26 %add.ptr = getelementptr inbounds i8, ptr %0, i64 %idx.ext
29 for.body17: ; preds = %for.body17, %for.body17.lr.ph
30 %outvalue.141 = phi i64 [ undef, %for.body17.lr.ph ], [ %add19, %for.body17 ]
31 %inptr.040 = phi ptr [ %add.ptr, %for.body17.lr.ph ], [ undef, %for.body17 ]
32 %1 = load i8, ptr %inptr.040
33 %add19 = mul nsw i64 0, %outvalue.141
34 br i1 false, label %for.body17, label %for.end22
36 for.end22: ; preds = %for.body17
37 %add31 = add i32 %outcol_h.048, %div
38 br i1 undef, label %for.body17.lr.ph, label %for.end32
40 for.end32: ; preds = %for.end22
43 for.end36: ; preds = %for.end32