Fix MIPS testsuite over-eager matching
authorJeff Law <jlaw@ventanamicro>
Wed, 8 Mar 2023 05:00:39 +0000 (22:00 -0700)
committerJeff Law <jlaw@ventanamicro>
Wed, 8 Mar 2023 05:02:39 +0000 (22:02 -0700)
commit0d25f8265b3ba9338f4572ac3fab08e3f33367a5
tree8a36b357bcca0a1190cdcfbf842f8b776eb53d17
parentdcce01af47b727749585e1f303e48af1f336a499
Fix MIPS testsuite over-eager matching

The mips msa-ds.c test is trying to ensure that MSA branches can have their
delay slots filled.  The regexp it used looked for the function name, a nop,
then the function name again.  If found that sequence, then the test failed.

The problem is with Vlad's recent IRA work there's simply less code in the
test (good) and as a result one of the *other* branches in the test had an
unfilled delay slot -- the delay slot for the MSA branch was still being
filled.

This patch tightens up the regexp.  In particular it looks for the MSA branch
and a nop on the next line (avoiding the over-eager .* construct).  That
indicates that the MSA branch did not have its delay slot filled.  When that
sequence is found, then the test fails.

This fixes the recent regressions for mips64 and mips64el in the tester.

Installing on the trunk,

gcc/testsuite:
* gcc.target/mips/msa-ds.c: Fix over eager pattern matching.
gcc/testsuite/gcc.target/mips/msa-ds.c