* [committed] Fix PR middle-end/53823
@ 2012-08-18 23:23 John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2012-08-18 23:23 UTC (permalink / raw)
To: gcc-patches
This change fixes PR middle-end/53823. The negative variant of
synth_mult doesn't handle modes larger than a host wide int.
Approved by rth in PR.
Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2012-08-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR middle-end/53823
* expmed.c (expand_mult): Skip synth_mult for negative coefficients
if the mode is larger than a wide int and it is too costly to multiply
by a positive multiplier and negate the result.
Index: expmed.c
===================================================================
--- expmed.c (revision 190317)
+++ expmed.c (working copy)
@@ -3261,7 +3261,6 @@
/* Attempt to handle multiplication of DImode values by negative
coefficients, by performing the multiplication by a positive
multiplier and then inverting the result. */
- /* ??? How is this not slightly redundant with the neg variant? */
if (is_neg && mode_bitsize > HOST_BITS_PER_WIDE_INT)
{
/* Its safe to use -coeff even for INT_MIN, as the
@@ -3278,6 +3277,7 @@
&algorithm, variant);
return expand_unop (mode, neg_optab, temp, target, 0);
}
+ goto skip_synth;
}
/* Exclude cost of op0 from max_cost to match the cost
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-18 23:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-18 23:23 [committed] Fix PR middle-end/53823 John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).