public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* patch to fix a test in PR55277
@ 2012-11-26 18:09 Vladimir Makarov
  0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2012-11-26 18:09 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

   The following patch fixes the second test case in

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55277

   As for the first case, I don' think it will be fixed soon as  I have 
more urgent PRs.

   The patch was successfully tested and bootstrapped on x86/x86-64.

   Committed as rev. 193824.

2012-11-26  Vladimir Makarov  <vmakarov@redhat.com>

         PR target/55277
         * lra-constraints.c (in_class_p): Check reg class contents too.

2012-11-26  Vladimir Makarov  <vmakarov@redhat.com>

         PR target/55277
         * gcc.target/i386/pr55227.c: New test.


[-- Attachment #2: pr55277.patch --]
[-- Type: text/plain, Size: 1076 bytes --]

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 193755)
+++ lra-constraints.c	(working copy)
@@ -293,7 +293,9 @@ in_class_p (rtx reg, enum reg_class cl,
 	  if (nregs == 1)
 	    return true;
 	  for (j = 0; j < nregs; j++)
-	    if (TEST_HARD_REG_BIT (lra_no_alloc_regs, hard_regno + j))
+	    if (TEST_HARD_REG_BIT (lra_no_alloc_regs, hard_regno + j)
+		|| ! TEST_HARD_REG_BIT (reg_class_contents[common_class],
+					hard_regno + j))
 	      break;
 	  if (j >= nregs)
 	    return true;
Index: testsuite/gcc.target/i386/pr55277.c
===================================================================
--- testsuite/gcc.target/i386/pr55277.c	(revision 0)
+++ testsuite/gcc.target/i386/pr55277.c	(working copy)
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O1" } */
+
+int a, c;
+
+void f(long long p)
+{
+  long long b;
+
+  if(b)
+    b = p ? : 0;
+
+  for (; p; p++)
+    p *= a & (c = p *= !a < 2);
+
+  a = b += !(b & 3740917449u);
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-26 18:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-26 18:09 patch to fix a test in PR55277 Vladimir Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).