llvm-for-llvmta/test/Transforms/LoopVectorize/no-interleave-up-front.ll

36 lines
1.4 KiB
LLVM
Raw Normal View History

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