Message ID | 20240710001958.3228381-1-quic_apinski@quicinc.com |
---|---|
State | New |
Headers | show |
Series | testsuite: Allow matching `{_1, { 0, 0, 0, 0 }}` for vect/slp-gap-1.c | expand |
On 7/9/24 6:19 PM, Andrew Pinski wrote: > 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}`. OK jeff
diff --git a/gcc/testsuite/gcc.dg/vect/slp-gap-1.c b/gcc/testsuite/gcc.dg/vect/slp-gap-1.c index 9856da7a7f4..74bde8219d9 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 } } } } } */
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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)