1 ; RUN: opt -passes=loop-vectorize -force-vector-width=8 -force-vector-interleave=1 -S %s | FileCheck --check-prefixes=CHECK,VF8UF1 %s
2 ; RUN: opt -passes=loop-vectorize -force-vector-width=8 -force-vector-interleave=2 -S %s | FileCheck --check-prefixes=CHECK,VF8UF2 %s
3 ; RUN: opt -passes=loop-vectorize -force-vector-width=16 -force-vector-interleave=1 -S %s | FileCheck --check-prefixes=CHECK,VF16UF1 %s
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7 ; Check if the vector loop condition can be simplified to true for a given
9 define void @test_tc_less_than_16(ptr %A, i64 %N) {
10 ; CHECK-LABEL: define void @test_tc_less_than_16(
11 ; VF8UF1: [[CMP:%.+]] = icmp eq i64 %index.next, %n.vec
12 ; VF8UF1-NEXT: br i1 [[CMP]], label %middle.block, label %vector.body
14 ; VF8UF2: br i1 true, label %middle.block, label %vector.body
16 ; VF16UF1: br i1 true, label %middle.block, label %vector.body
23 %iv = phi i64 [ %and, %entry ], [ %iv.next, %loop ]
24 %p.src = phi ptr [ %A, %entry ], [ %p.src.next, %loop ]
25 %p.src.next = getelementptr inbounds i8, ptr %p.src, i64 1
26 %l = load i8, ptr %p.src, align 1
27 %add = add nsw i8 %l, 10
28 store i8 %add, ptr %p.src
29 %iv.next = add nsw i64 %iv, -1
30 %cmp = icmp eq i64 %iv.next, 0
31 br i1 %cmp, label %exit, label %loop