This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Resolve pr44194-1.c failure by refining scan-rtl-dump-not pattern


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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]