aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-10-07 18:45:56 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2008-10-07 11:45:56 -0700
commitaee857a2f4fbbcf0d3fde1d80c8c40d53b5edab1 (patch)
treef586d335f31ec62e37bfd7708d7eb8de993cf531 /gcc/expmed.c
parentc7c79a09d6abdcfe54b67c54374ca538665152c5 (diff)
downloadgcc-aee857a2f4fbbcf0d3fde1d80c8c40d53b5edab1.zip
gcc-aee857a2f4fbbcf0d3fde1d80c8c40d53b5edab1.tar.gz
gcc-aee857a2f4fbbcf0d3fde1d80c8c40d53b5edab1.tar.bz2
re PR middle-end/37731 (long long may not work correctly on 32bit host)
gcc/ 2008-10-07 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/37731 * expmed.c (expand_mult): Properly check DImode constant in CONST_DOUBLE. gcc/testsuite/ 2008-10-07 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/37731 * gcc.dg/torture/pr37731-1.c: New. * gcc.dg/torture/pr37731-2.c: Likewise. From-SVN: r140947
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index ae5ad0a..5e8d7f3 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3075,7 +3075,8 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
{
/* If we are multiplying in DImode, it may still be a win
to try to work with shifts and adds. */
- if (CONST_DOUBLE_HIGH (op1) == 0)
+ if (CONST_DOUBLE_HIGH (op1) == 0
+ && CONST_DOUBLE_LOW (op1) > 0)
coeff = CONST_DOUBLE_LOW (op1);
else if (CONST_DOUBLE_LOW (op1) == 0
&& EXACT_POWER_OF_2_OR_ZERO_P (CONST_DOUBLE_HIGH (op1)))