This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37731] [4.2/4.3/4.4 Regression] unsigned long long may not work correctly on 32bit host
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2008 18:25:06 -0000
- Subject: [Bug middle-end/37731] [4.2/4.3/4.4 Regression] unsigned long long may not work correctly on 32bit host
- References: <bug-37731-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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