Revert "Warn when unique objects might be duplicated in shared libraries (#117622)"
[llvm-project.git] / llvm / test / Transforms / LoopVectorize / vplan-force-tail-with-evl.ll
blobf510d47d06e367fec062a017b54980660fcadd3e
1 ; REQUIRES: asserts
3 ; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize \
4 ; RUN: -force-tail-folding-style=data-with-evl -force-vector-width=4 \
5 ; RUN: -force-target-supports-scalable-vectors -scalable-vectorization=on \
6 ; RUN: -disable-output < %s 2>&1 | FileCheck --check-prefixes=NO-VP %s
8 ; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize \
9 ; RUN: -force-tail-folding-style=none \
10 ; RUN: -prefer-predicate-over-epilogue=predicate-dont-vectorize \
11 ; RUN: -force-target-supports-scalable-vectors -scalable-vectorization=on \
12 ; RUN: -disable-output < %s 2>&1 | FileCheck --check-prefixes=NO-VP %s
14 ; The target does not support predicated vectorization.
15 define void @foo(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
16 ; NO-VP-NOT: EXPLICIT-VECTOR-LENGTH-BASED-IV-PHI
18 entry:
19   br label %for.body
21 for.body:
22   %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
23   %arrayidx = getelementptr inbounds i32, ptr %b, i64 %iv
24   %0 = load i32, ptr %arrayidx, align 4
25   %arrayidx2 = getelementptr inbounds i32, ptr %c, i64 %iv
26   %1 = load i32, ptr %arrayidx2, align 4
27   %add = add nsw i32 %1, %0
28   %arrayidx4 = getelementptr inbounds i32, ptr %a, i64 %iv
29   store i32 %add, ptr %arrayidx4, align 4
30   %iv.next = add nuw nsw i64 %iv, 1
31   %exitcond.not = icmp eq i64 %iv.next, %N
32   br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
34 for.cond.cleanup:
35   ret void