https://gcc.gnu.org/g:6fce4664d4a2e44843bd1464930696c819906d0f

commit r15-1934-g6fce4664d4a2e44843bd1464930696c819906d0f
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Tue Jul 9 17:13:24 2024 -0700

    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_apin...@quicinc.com>

Diff:
---
 gcc/testsuite/gcc.dg/vect/slp-gap-1.c | 6 ++++--
 1 file 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 9856da7a7f48..74bde8219d9a 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 } } } } } */

Reply via email to