[llvm] [AArch64][SLP] Add NFC test cases for floating point reductions (PR #106507)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 02:56:56 PDT 2024
================
@@ -0,0 +1,1232 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes=slp-vectorizer -mtriple=aarch64-unknown-linux -S | FileCheck %s
+; RUN: opt < %s -passes=slp-vectorizer -mtriple=aarch64-unknown-linux -mcpu=neoverse-v2 \
+; RUN: -S | FileCheck %s --check-prefix=NEOV2
----------------
sushgokh wrote:
@davemgreen The presence of function attribute as below with `-mattr=+fullfp16`
```
; NEOV2-SAME: <2 x half> [[VEC2:%.*]]) #[[ATTR0:[0-9]+]] {
```
is proving to be hindrance with merging of outputs with `check-prefixes`.
There are manual ways to get over this issue such as
1. Checking only the required part as below with `CHECK-SAME`
```
; RUN: opt < %s -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux | FileCheck %s
; RUN: opt < %s -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux -mattr=+fullfp16 | FileCheck %s
define half @reduce_fast_half2(<2 x half> %vec2) {
; CHECK-LABEL: define half @reduce_fast_half2(
; CHECK-SAME: <2 x half> [[VEC2:%.*]])
...
...
```
2. Maybe using regular expression `{{.*}}` in place of the function attribute
The cons of the manual approach here would be:
1. Auto updating tests is not possible
2. For large no of tests, this is lot of manual work
Any way to scrub the function attribute here so that using `check-prefixes` becomes possible?
https://github.com/llvm/llvm-project/pull/106507
More information about the llvm-commits
mailing list