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

Matthew Devereau via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 06:10:15 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
----------------
MDevereau wrote:

My knee-jerk reaction to this test is that the output is quite verbose and we don't need to know the details of most of it or auto-generate it. I think we just need to know that we can generate scalable code? I'd consider just asserting 

```c++
define void @test(ptr %dst, i32 %n, i64 %val) {
; CHECK-LABEL: define void @test
; CHECK:         call i64 @llvm.vscale.i64()
; CHECK:         ret void
;
entry: ...
``` 
and anything unique to tail-folding for this test, but I imagine @david-arm knows if this is a good idea or not.

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


More information about the llvm-commits mailing list