brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · f510d47 Raw
38 lines · plain
1; REQUIRES: asserts2 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 %s7 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 %s13 14; The target does not support predicated vectorization.15define void @foo(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {16; NO-VP-NOT: EXPLICIT-VECTOR-LENGTH-BASED-IV-PHI17 18entry:19  br label %for.body20 21for.body:22  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]23  %arrayidx = getelementptr inbounds i32, ptr %b, i64 %iv24  %0 = load i32, ptr %arrayidx, align 425  %arrayidx2 = getelementptr inbounds i32, ptr %c, i64 %iv26  %1 = load i32, ptr %arrayidx2, align 427  %add = add nsw i32 %1, %028  %arrayidx4 = getelementptr inbounds i32, ptr %a, i64 %iv29  store i32 %add, ptr %arrayidx4, align 430  %iv.next = add nuw nsw i64 %iv, 131  %exitcond.not = icmp eq i64 %iv.next, %N32  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body33 34for.cond.cleanup:35  ret void36}37 38