This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/37731] [4.2/4.3/4.4 Regression] unsigned long long may not work correctly on 32bit host



------- Comment #9 from hjl dot tools at gmail dot com  2008-10-04 18:25 -------
When we multiple a DImode constant in CONST_DOUBLE, if
CONST_DOUBLE_HIGH (op1) == 0, the constant must be
positive. In this case, we can't just check coeff != 0.
Does this patch make senses?

--- ./expmed.c.ll       2008-09-29 08:37:56.000000000 -0700
+++ ./expmed.c  2008-10-04 11:20:29.000000000 -0700
@@ -3092,7 +3092,7 @@ expand_mult (enum machine_mode mode, rtx
         produce a smaller program when -O is not used.  But this causes
         such a terrible slowdown sometimes that it seems better to always
         use synth_mult.  */
-      if (coeff != 0)
+      if (coeff > 0 || (coeff < 0 && GET_CODE (op1) == CONST_INT))
        {
          /* Special case powers of two.  */
          if (EXACT_POWER_OF_2_OR_ZERO_P (coeff))


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
   Target Milestone|4.2.5                       |4.4.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]