* Trivial improvement to recent change to split point selection for multiply-accumulate instructions
@ 2015-05-27 6:12 Jeff Law
0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2015-05-27 6:12 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
Segher suggested that the change to favor (plus (ashift (...))) as a
split point be conditionalized on the shift count being a constant --
seems quite reasonable to me.
Bootstrapped and regression tested on x86_64-linux-gnu as well as
verified the 300+ test files generate the same code before/after on the
PA and hppa.exp passes.
Installed on the trunk.
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 876 bytes --]
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f02ba5c..bf90c86 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2015-05-26 Jeff Law <law@redhat.com>
+ * combine.c (find_split_point): Verify that the shift count is a
+ constant when choosing (plus (ashift ...)) as a split point.
+
* tree-ssa-threadupdate.c: Replace 8 space sequences with tabs.
No functional changes.
diff --git a/gcc/combine.c b/gcc/combine.c
index 73d141e..55a2e35 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5157,7 +5157,8 @@ find_split_point (rtx *loc, rtx_insn *insn, bool set_src)
worthless to try this split. */
if (!set_src
&& (GET_CODE (XEXP (x, 0)) == MULT
- || GET_CODE (XEXP (x, 0)) == ASHIFT))
+ || (GET_CODE (XEXP (x, 0)) == ASHIFT
+ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)))
return loc;
default:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-27 4:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 6:12 Trivial improvement to recent change to split point selection for multiply-accumulate instructions Jeff Law
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).