1 ; RUN: opt -S -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -instsimplify -simplifycfg < %s | FileCheck %s
2 ; Note: -instsimplify -simplifycfg remove the (now dead) original loop, making
3 ; it easy to test that the llvm.loop.unroll.disable hint is still present.
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 ; Function Attrs: norecurse nounwind uwtable
7 define void @foo(i32* nocapture %b) #0 {
11 for.cond.cleanup: ; preds = %for.body
14 for.body: ; preds = %for.body, %entry
15 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
16 %arrayidx = getelementptr inbounds i32, i32* %b, i64 %indvars.iv
17 store i32 1, i32* %arrayidx, align 4
18 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
19 %exitcond = icmp eq i64 %indvars.iv.next, 16
20 br i1 %exitcond, label %for.cond.cleanup, label %for.body, !llvm.loop !0
24 ; CHECK: = !{!"llvm.loop.unroll.disable"}
26 attributes #0 = { norecurse nounwind uwtable }
28 !0 = distinct !{!0, !1}
29 !1 = !{!"llvm.loop.unroll.disable"}