]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Allow matching `{_1, { 0,0,0,0 }}` for vect/slp-gap-1.c
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 10 Jul 2024 00:13:24 +0000 (17:13 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 10 Jul 2024 05:22:24 +0000 (22:22 -0700)
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>
gcc/testsuite/gcc.dg/vect/slp-gap-1.c

index 9856da7a7f48952f622e0d937a5ba2789ccc1c94..74bde8219d9aa71739848362c6da6dadec570594 100644 (file)
@@ -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 } } } } } */