1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=loop-vectorize -enable-vplan-native-path -S %s | FileCheck %s
6 ; Make sure we do not vectorize (or crash) on outer loops with uncomputable
12 ; CHECK-NEXT: br label [[FOR1_HEADER:%.*]]
14 ; CHECK-NEXT: br label [[FOR2_HEADER:%.*]]
16 ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ 0, [[FOR1_HEADER]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR2_HEADER]] ]
17 ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
18 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT]], 0
19 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR1_LATCH:%.*]], label [[FOR2_HEADER]]
21 ; CHECK-NEXT: [[C:%.*]] = call i1 @cond()
22 ; CHECK-NEXT: br i1 [[C]], label [[EXIT:%.*]], label [[FOR1_HEADER]], !llvm.loop !0
24 ; CHECK-NEXT: ret void
29 for1.header: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
32 for2.header: ; preds = %for.body10, %for.body10.preheader
33 %indvars.iv = phi i64 [ 0, %for1.header ], [ %indvars.iv.next, %for2.header ]
34 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
35 %exitcond = icmp eq i64 %indvars.iv.next, 0
36 br i1 %exitcond, label %for1.latch, label %for2.header
38 for1.latch: ; preds = %for.cond.cleanup9
40 br i1 %c, label %exit, label %for1.header, !llvm.loop !0
42 exit: ; preds = %for.cond.cleanup3, %entry
46 !0 = distinct !{!0, !1}
47 !1 = !{!"llvm.loop.vectorize.enable", i1 true}