[gcc r17-2727] testsuite/aarch64: accept either ubfx width in struct_3 test_nonpst8
Kyrylo Tkachov via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:61379576eed5c5847c6ccfab5c712ecd5919ac13 commit r17-2727-g61379576eed5c5847c6ccfab5c712ecd5919ac13 Author: Kyrylo Tkachov <[email protected]> Date: Sun Jul 26 05:18:55 2026 -0700 testsuite/aarch64: accept either ubfx width in struct_3 test_nonpst8 r17-2413-ge46d96d20bbf ("PR middle-end/123236: Simplify (int)((long long)x >> 4)") relaxed the guard on the truncate-of-extract simplification in simplify_truncation, so combine can now narrow (truncate:SI (zero_extract:DI (subreg:DI (reg:V2QI)) 8 8)) to an SImode extract, and test_nonpst8 ends in ubfx w0 rather than ubfx x0. Both compute the same 64-bit result in x0. These blocks exist to check the SVE PCS handling of a non-pure-scalable struct, so the width the extract happens to use is incidental. Accept either rather than swapping one hard-coded width for the other, so the test does not break again the next time the narrowing decision moves. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/pcs/struct_3_128.c (test_nonpst8): Accept a ubfx of either width. * gcc.target/aarch64/sve/pcs/struct_3_256.c (test_nonpst8): Likewise for little endian. Signed-off-by: Kyrylo Tkachov <[email protected]> Diff: --- gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_128.c | 2 +- gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_128.c b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_128.c index 7583d0c0c1c4..02bf10cd4fd5 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_128.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_128.c @@ -1074,7 +1074,7 @@ SEL2 (struct, nonpst8) /* ** test_nonpst8: -** ubfx x0, x0, 8, 8 +** ubfx [wx]0, [wx]0, 8, 8 ** ret */ /* { dg-final { scan-assembler-not {\t\.variant_pcs\ttest_nonpst8\n} } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c index af0af29d5150..02ec1aeae052 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c @@ -1187,7 +1187,7 @@ SEL2 (struct, nonpst8) /* ** test_nonpst8: { target aarch64_little_endian } -** ubfx x0, x0, 8, 8 +** ubfx [wx]0, [wx]0, 8, 8 ** ret */ /*