aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-07-09 17:13:24 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-07-09 22:22:24 -0700
commit6fce4664d4a2e44843bd1464930696c819906d0f (patch)
treec49aab2ef767490a944a2ce41cbeae121f6fcae5
parent8f8bddb58ad7746b2a19c43e32641d161fa15caf (diff)
downloadgcc-6fce4664d4a2e44843bd1464930696c819906d0f.zip
gcc-6fce4664d4a2e44843bd1464930696c819906d0f.tar.gz
gcc-6fce4664d4a2e44843bd1464930696c819906d0f.tar.bz2
testsuite: Allow matching `{_1, { 0,0,0,0 }}` for vect/slp-gap-1.c
While working on adding V4QI support to the aarch64 backend, vect/slp-gap-1.c started to fail but only because the regex was failing. Before it was loading use SI (int) and afterwards, we started to use V4QI. The generated code was the same and the generated gimple was almost the same. The regex was searching for `zero-padding trick` and it was still doing that but instead of directly 0, it was V4QI 0 (or rather `{ 0, 0, 0 }`). This extends regex to support both. Tested on x86_64-linux-gnu and aarch64-linux-gnu (with the support added). gcc/testsuite/ChangeLog: * gcc.dg/vect/slp-gap-1.c: Support matching `{_1, { 0, 0, 0, 0 }}` in addition to `{_1, 0}`. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-gap-1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/slp-gap-1.c b/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
index 9856da7..74bde82 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-gap-1.c
@@ -14,5 +14,7 @@ void pixel_sub_wxh(int16_t * __restrict diff, uint8_t *pix1, uint8_t *pix2) {
/* We can vectorize this without peeling for gaps and thus without epilogue,
but the only thing we can reliably scan is the zero-padding trick for the
- partial loads. */
-/* { dg-final { scan-tree-dump-times "\{_\[0-9\]\+, 0" 6 "vect" { target { vect64 && { vect_unpack && vect_perm } } } } } */
+ partial loads.
+ Note this will match `{_1, 0}` or `{_1, {0, 0, 0, 0}}`. Both are the same
+ in the end, the difference is the load is either via SI or V4QI. */
+/* { dg-final { scan-tree-dump-times "\{_\[0-9\]\+, (?:0\|{ 0(?:, 0)\+ )}" 6 "vect" { target { vect64 && { vect_unpack && vect_perm } } } } } */