1 ; RUN: opt -passes=transform-warning -disable-output -pass-remarks-missed=transform-warning -pass-remarks-analysis=transform-warning < %s 2>&1 | FileCheck -allow-empty %s
3 ; Verify that no transformation warnings are emitted for functions with
6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
8 define void @func(ptr nocapture %A, ptr nocapture readonly %B, i32 %Length) #0 {
10 %cmp9 = icmp sgt i32 %Length, 0
11 br i1 %cmp9, label %for.body.preheader, label %for.end
17 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ]
18 %arrayidx = getelementptr inbounds i32, ptr %B, i64 %indvars.iv
19 %0 = load i32, ptr %arrayidx, align 4
20 %idxprom1 = sext i32 %0 to i64
21 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %idxprom1
22 %1 = load i32, ptr %arrayidx2, align 4
23 %arrayidx4 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
24 store i32 %1, ptr %arrayidx4, align 4
25 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
26 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
27 %exitcond = icmp eq i32 %lftr.wideiv, %Length
28 br i1 %exitcond, label %for.end.loopexit, label %for.body, !llvm.loop !0
37 attributes #0 = { noinline optnone }
39 !0 = distinct !{!0, !1, !2, !3}
40 !1 = !{!"llvm.loop.unroll.enable"}
41 !2 = !{!"llvm.loop.distribute.enable"}
42 !3 = !{!"llvm.loop.unroll_and_jam.enable"}
43 !4 = !{!"llvm.loop.vectorize.enable", i1 true}