------- Comment #11 from steven at gcc dot gnu dot org  2008-02-03 13:25 -------
My RTL fu is not sufficient to determine whether the following one-liner patch
is DTRT.  Eric, could you have a look at this, please?

Index: combine.c
===================================================================
--- combine.c   (revision 132078)
+++ combine.c   (working copy)
@@ -5393,9 +5393,10 @@
   /* Look for cases where we have (abs x) or (neg (abs X)).  */

   if (GET_MODE_CLASS (mode) == MODE_INT
+      && comparison_p
+      && XEXP (cond, 1) == const0_rtx
       && GET_CODE (false_rtx) == NEG
       && rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
-      && comparison_p
       && rtx_equal_p (true_rtx, XEXP (cond, 0))
       && ! side_effects_p (true_rtx))
     switch (true_code)


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


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

Reply via email to