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.
4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5
6; Function Attrs: norecurse nounwind uwtable
7define void @foo(i32* nocapture %b) #0 {
8entry:
9  br label %for.body
10
11for.cond.cleanup:                                 ; preds = %for.body
12  ret void
13
14for.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
21}
22
23; CHECK-LABEL: @foo
24; CHECK: = !{!"llvm.loop.unroll.disable"}
25
26attributes #0 = { norecurse nounwind uwtable }
27
28!0 = distinct !{!0, !1}
29!1 = !{!"llvm.loop.unroll.disable"}
30