xref: /llvm-project/polly/test/CodeGen/scop_expander_insert_point.ll (revision 0b9f1cc024ca6c7e8d60524be07c0ddfcd08b23c)
1; RUN: opt %loadNPMPolly -passes=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:   %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
10;
11target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12
13; Function Attrs: nounwind uwtable
14define void @int_downsample() #0 {
15entry:
16  %div = sdiv i32 undef, undef
17  br label %for.cond10.preheader.lr.ph
18
19for.cond10.preheader.lr.ph:                       ; preds = %entry
20  br label %for.body17.lr.ph
21
22for.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
27  br label %for.body17
28
29for.body17:                                       ; preds = %for.body17, %for.body17.lr.ph
30  %outvalue.141 = phi i64 [ poison, %for.body17.lr.ph ], [ %add19, %for.body17 ]
31  %inptr.040 = phi ptr [ %add.ptr, %for.body17.lr.ph ], [ poison, %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
35
36for.end22:                                        ; preds = %for.body17
37  %add31 = add i32 %outcol_h.048, %div
38  br i1 undef, label %for.body17.lr.ph, label %for.end32
39
40for.end32:                                        ; preds = %for.end22
41  br label %for.end36
42
43for.end36:                                        ; preds = %for.end32
44  ret void
45}
46