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