[llvm] [AArch64][LoopVectorize] Use either fixed-width or scalable VF when tail-folding (PR #67543)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 06:23:43 PDT 2023


================
@@ -0,0 +1,109 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; RUN: opt -S < %s -passes=loop-vectorize -mtriple aarch64-linux-gnu -mattr=+sve 2>&1 | FileCheck %s
+
+define void @test(ptr nocapture noundef writeonly %dst, i32 noundef %n, i64 noundef %val) local_unnamed_addr #0 {
+; CHECK-LABEL: define void @test
----------------
david-arm wrote:

Hmm, I think in theory we could just get away with a CHECK line for the store, i.e.

; CHECK: call void @llvm.masked.store.nxv8i8.p0(<vscale x 8 x i8> [[TMP19]], ptr [[TMP20]], i32 1, <vscale x 8 x i1>

because we also care about the choice of VF given previously we were clamping to a fixed-width VF when tail-folding.

However, it does seem to be common practice in LLVM to run the update_test_checks.py script on every file so I understand why @rin-arm created the test this way.

I think for now having a single CHECK is fine, but if the file grows a lot in size in future it may be harder to manually maintain the CHECK lines.


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


More information about the llvm-commits mailing list