1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=loop-vectorize -S | FileCheck %s
4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 ; Test case based on reproducer for
7 ; http://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6477
9 define void @test1(i32 %n) #0 {
10 ; CHECK-LABEL: @test1(
11 ; CHECK-NEXT: br i1 false, label [[DOTLR_PH_PREHEADER:%.*]], label [[DOT_CRIT_EDGE:%.*]]
12 ; CHECK: .lr.ph.preheader:
13 ; CHECK-NEXT: br label [[DOTLR_PH:%.*]]
15 ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[DOTLR_PH]] ], [ 0, [[DOTLR_PH_PREHEADER]] ]
16 ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add i64 [[INDVARS_IV]], 1
17 ; CHECK-NEXT: br i1 true, label [[DOT_CRIT_EDGE_LOOPEXIT:%.*]], label [[DOTLR_PH]], !llvm.loop !0
18 ; CHECK: ._crit_edge.loopexit:
19 ; CHECK-NEXT: br label [[DOT_CRIT_EDGE]]
21 ; CHECK-NEXT: ret void
23 br i1 false, label %.lr.ph, label %._crit_edge
25 .lr.ph: ; preds = %.lr.ph, %0
26 %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
27 %indvars.iv.next = add i64 %indvars.iv, 1
28 br i1 true, label %._crit_edge, label %.lr.ph, !llvm.loop !0
30 ._crit_edge: ; preds = %.lr.ph, %0
34 !0 = distinct !{!0, !1}
35 !1 = !{!"llvm.loop.interleave.count", i32 2}