diff mbox

[committed] Tighten tree-ssa/vrp51.c

Message ID 87mxmzgtlg.fsf@firetop.home
State New
Headers show

Commit Message

Richard Sandiford Jan. 17, 2011, 8:31 p.m. UTC
tree-ssa/vrp51.c uses "bug.foo" asm strings to record VRP failures,
then checks for them with a { scan-assembler-not "bug\." }.  This
scan always triggers on MIPS targets, which for historical reasons
declare an "mdebug.abiXX" section.

The patch below prefixes each string with "vrp.".  It also changes
the "\." to "\\\.": "\" is a string escape, so the regexp was
actually {bug.} rather than the intended {bug\.}.

Tested on mips64-linux-gnu.  I also tried removing -O2 and checked
that the test did indeed fail (i.e. that the dg-final was picking
up the new strings).

This is probably pushing the boundaries of obviousness, but hopefully
it still counts.  Applied on that basis.

Richard


gcc/testsuite/
	* gcc.dg/tree-ssa/vrp51.c: Prefix each "bug." string with "vrp.".
	Update dg-final accordingly.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/tree-ssa/vrp51.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/vrp51.c	2011-01-17 20:23:12.000000000 +0000
+++ gcc/testsuite/gcc.dg/tree-ssa/vrp51.c	2011-01-17 20:24:43.000000000 +0000
@@ -10,10 +10,10 @@  v4 (unsigned a, unsigned b)
   if (b < 0x0110) return;
   /* constant true.  */
   if (!__builtin_constant_p ((a|b) >= 0x01000))
-    __asm__("bug.always.true");
+    __asm__("vrp.bug.always.true");
   /* VRP must not think that this is constant.  */
   if (__builtin_constant_p ((a|b) >= 0x10000))
-    __asm__("bug.not.always.true");
+    __asm__("vrp.bug.not.always.true");
 }
 
 void
@@ -23,13 +23,13 @@  u4 (unsigned n)
   if (n < 0x10101) return;
   /* always true.  */
   if (!__builtin_constant_p (n & 0x00100))
-    __asm__("bug.always.true");
+    __asm__("vrp.bug.always.true");
   /* VRP must not think that this is constant true.  */
   if (__builtin_constant_p (n & 0x00001))
-    __asm__("bug.not.always.true");
+    __asm__("vrp.bug.not.always.true");
   /* Out of range, always evaluates to constant false.  */
   if (!__builtin_constant_p (n & 0x01000))
-    __asm__("bug.always.false");
+    __asm__("vrp.bug.always.false");
 }
 
 void
@@ -38,7 +38,7 @@  u5 (unsigned n)
   struct s {unsigned exp:8;} x;
   x.exp = n;
   if (__builtin_constant_p(((n + 1) & 255) > 1))
-    __asm__("bug.not.always.true");
+    __asm__("vrp.bug.not.always.true");
 }
 
 void
@@ -49,10 +49,10 @@  v5 (int a, int b)
   if (b < 0x0110) return;
   /* constant true.  */
   if (!__builtin_constant_p ((a|b) >= 0x01000))
-    __asm__("bug.always.true");
+    __asm__("vrp.bug.always.true");
   /* VRP must not think that this is always true.  */
   if (__builtin_constant_p ((a|b) >= 0x10000))
-    __asm__("bug.not.always.true");
+    __asm__("vrp.bug.not.always.true");
 }
 
-/* { dg-final { scan-assembler-not "bug\." } } */
+/* { dg-final { scan-assembler-not "vrp\\\.bug\\\." } } */