[llvm] [LV] Add test for tail fold by masking with external IV users. (PR #82329)

Niwin Anto via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 04:54:23 PST 2024


================
@@ -0,0 +1,159 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -S | FileCheck %s
+
+; The vectorizer should refuse to fold the tail by masking because
+; %conv is used outside of the loop. Test for this by checking that
+; %n.vec, the vector trip count, is rounded down to the next multiple of
+; 4. If folding the tail, it would have been rounded up instead.
+; Test case for #76069.
+define i32 @test(ptr %arr, i64 %n) {
----------------
niwinanto wrote:

Done.

https://github.com/llvm/llvm-project/pull/82329


More information about the llvm-commits mailing list