This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Generate switch statements in genpreds.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Jun 2006 18:50:36 -0600 (MDT)
- Subject: Re: [PATCH] Generate switch statements in genpreds.c
Hi Richard,
On Thu, 29 Jun 2006, Richard Earnshaw wrote:
> Unfortunately, on an ARM-eabi cross
> ...
> is now compiled to
> ...
> Which is not a correct expansion of the logic of the predicate.
Extremely sorry! It's a simple mistake of a missing break. The
problematic case of (IOR (X (FOO (Y ...)))) where X and Y are both
generate_switch_p is rare enough that it didn't show up in testing
on either rs6000.md or i386.md.
Fixed with the following patch. Committed to mainline as obvious
as revision 115061. Sorry for the inconvenience. Hopefully most
GCC hackers are currently too drunk to notice this very transient
glitch :-)
2006-06-28 Roger Sayle <roger@eyesopen.com>
* genpreds.c (write_predicate_stmts) <IOR>: Add missing break.
Index: genpreds.c
===================================================================
*** genpreds.c (revision 115060)
--- genpreds.c (working copy)
*************** write_predicate_stmts (rtx exp)
*** 607,612 ****
--- 607,613 ----
" }");
exp = XEXP (exp, 1);
}
+ break;
case NOT:
if (generate_switch_p (XEXP (exp, 0)))
Roger
--