1; REQUIRES: asserts 2; RUN: opt -p loop-vectorize -debug-only=loop-vectorize --disable-output -S %s 2>&1 | FileCheck %s 3 4 5; CHECK-LABEL: LV: Checking a loop in 'latch_exit_cannot_compute_btc_due_to_step' 6; CHECK: LV: Did not find one integer induction var. 7; CHECK-NEXT: LV: Not vectorizing: Cannot vectorize uncountable loop. 8; CHECK-NEXT: LV: Interleaving disabled by the pass manager 9; CHECK-NEXT: LV: Not vectorizing: Cannot prove legality. 10 11; CHECK-LABEL: LV: Checking a loop in 'header_exit_cannot_compute_btc_due_to_step' 12; CHECK: LV: Found an induction variable. 13; CHECK-NEXT: LV: Did not find one integer induction var. 14; CHECK-NEXT: LV: Not vectorizing: Cannot vectorize uncountable loop. 15; CHECK-NEXT: LV: Interleaving disabled by the pass manager 16; CHECK-NEXT: LV: Not vectorizing: Cannot prove legality. 17 18; CHECK-NOT: vector.body 19define void @latch_exit_cannot_compute_btc_due_to_step(ptr %dst, i64 %step) { 20entry: 21 br label %loop 22 23loop: ; preds = %loop, %for.cond.us 24 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ] 25 %iv.next = add i64 %iv, %step 26 %gep = getelementptr i8, ptr %dst, i64 %iv 27 store i8 0, ptr %gep, align 1 28 %ec = icmp eq i64 %iv.next, 1000 29 br i1 %ec, label %loop, label %exit 30 31exit: 32 ret void 33} 34 35define void @header_exit_cannot_compute_btc_due_to_step(ptr %dst, i64 %step) { 36entry: 37 br label %loop.header 38 39loop.header: 40 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop.latch ] 41 %iv.next = add i64 %iv, %step 42 %ec = icmp eq i64 %iv.next, 1000 43 br i1 %ec, label %loop.latch, label %exit 44 45loop.latch: 46 %gep = getelementptr i8, ptr %dst, i64 %iv 47 store i8 0, ptr %gep, align 1 48 br label %loop.header 49 50exit: 51 ret void 52} 53