diff mbox

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

Message ID 87lhy8tlzl.fsf@talisman.default
State New
Headers show

Commit Message

Richard Sandiford Jan. 22, 2014, 9:16 a.m. UTC
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".

Comments

Eric Botcazou Jan. 22, 2014, 10:57 a.m. UTC | #1
> Ah, OK.  In that case, how about this?  Tested on mips64-linux-gnu.

Fine with me, thanks!
diff mbox

Patch

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