The test added by r16-1671-ge7ff8e8d77df74 passed despite using
regular expressions that would never match real assembly language
output from the compiler.

Modified the test added by r16-1671-ge7ff8e8d77df74 to use scan-assembler-times
instead of scan-assembler-not (because we expect to see the old assembly 
language
instructions before the change to ivopts):

/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.d, 
p[0-9]+/z\[x[0-9]+\.d\]} 1 } } */
/* { dg-final { scan-assembler-times {\tst1w\tz[0-9]+\.d, 
p[0-9]+/z\[x[0-9]+\.d\]} 1 } } */

Reverted all of the other changes in commit r16-1671-ge7ff8e8d77df74.

Tested on AArch64 using: make check-gcc RUNTESTFLAGS="aarch64-sve.exp=adr_7.c"

Verified that the test fails (because the regexes are wrong):

FAIL: gcc.target/aarch64/sve/adr_7.c scan-assembler-times 
\\tld1w\\tz[0-9]+\\.d, p[0-9]+/z\\[x[0-9]+\\.d\\] 1
FAIL: gcc.target/aarch64/sve/adr_7.c scan-assembler-times 
\\tst1w\\tz[0-9]+\\.d, p[0-9]+/z\\[x[0-9]+\\.d\\] 1

Modified the regexes to match the generated assembly language:

/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-9]+/z, 
\[x[0-9]+\]} 1 } } */
/* { dg-final { scan-assembler-times {\tst1w\tz[0-9]+\.s, p[0-9]+, \[x[0-9]+\]} 
1 } } */

Checked that the modified test passes.

Reinstated the other changes in commit r16-1671-ge7ff8e8d77df74.

Modified the test to use scan-assembler-not instead of scan-assembler-times
(because we no longer expect to see the old assembly language instructions
after the change to ivopts):

/* { dg-final { scan-assembler-not {\tld1w\tz[0-9]+\.s, p[0-9]+/z, \[x[0-9]+\]} 
} } */
/* { dg-final { scan-assembler-not {\tst1w\tz[0-9]+\.s, p[0-9]+, \[x[0-9]+\]} } 
} */

Checked that the modified test passes.

OK for trunk?

Christopher Bazley (1):
  ivopts: Fix scan-assembler-not regexes for aarch64/sve test

 gcc/testsuite/gcc.target/aarch64/sve/adr_7.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.43.0

Reply via email to