2 ; RUN: opt -p loop-vectorize -debug-only=loop-vectorize --disable-output -S %s 2>&1 | FileCheck %s
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.
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.
18 ; CHECK-NOT: vector.body
19 define void @latch_exit_cannot_compute_btc_due_to_step(ptr %dst, i64 %step) {
23 loop: ; 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
35 define void @header_exit_cannot_compute_btc_due_to_step(ptr %dst, i64 %step) {
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
46 %gep = getelementptr i8, ptr %dst, i64 %iv
47 store i8 0, ptr %gep, align 1