This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Resolve pr44194-1.c failure by refining scan-rtl-dump-not pattern
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Renlin Li <renlin dot li at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Wed, 22 Jan 2014 09:16:30 +0000
- Subject: Re: Resolve pr44194-1.c failure by refining scan-rtl-dump-not pattern
- Authentication-results: sourceware.org; auth=none
- References: <52CFC98B dot 3090507 at arm dot com> <6785942 dot NKxLKDnGgO at polaris> <87y529t6jj dot fsf at talisman dot default> <3033743 dot I5I8v0tIRM at polaris>
Eric Botcazou <ebotcazou@adacore.com> writes:
>> It looks like the committed version removed the space after "insn".
>> Was that intentional? It now triggers on MIPS because of the frame-related
>> (insn/f) prologue instruction that stores the link register. The posted
>> version works for me FWIW.
>
> I found out that it didn't fail with the space on x86 (hence false negative)
> because of the TI marker added by some RTL pass. Feel free to adjust back.
Ah, OK. In that case, how about this? Tested on mips64-linux-gnu.
Thanks,
Richard
gcc/testsuite/
* gcc.dg/pr44194-1.c: Match "insn " and "insn:", but not "insn/f".
Index: gcc/testsuite/gcc.dg/pr44194-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr44194-1.c 2014-01-22 09:14:03.560619722 +0000
+++ gcc/testsuite/gcc.dg/pr44194-1.c 2014-01-22 09:15:32.657347434 +0000
@@ -15,5 +15,9 @@ void func() {
/* { dg-final { scan-rtl-dump "global deletions = (2|3)" "dse1" } } */
/* { dg-final { cleanup-rtl-dump "dse1" } } */
-/* { dg-final { scan-rtl-dump-not "insn\[^\n\]*set \\(mem(?!\[^\n\]*scratch)" "final" } } */
+/* Here we want to ignore frame-related instructions, marked as insn/f,
+ that do things like store the link register to the stack. We also want
+ to treat insns the same regardless of whether they have a scheduling
+ :TI marker, so match both "insn " and "insn:". */
+/* { dg-final { scan-rtl-dump-not "insn\[: \]\[^\n\]*set \\(mem(?!\[^\n\]*scratch)" "final" } } */
/* { dg-final { cleanup-rtl-dump "final" } } */