* [PATCH] rs6000: Implement insn_cost for mfcr, mfcrf
@ 2017-11-06 9:00 Segher Boessenkool
0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2017-11-06 9:00 UTC (permalink / raw)
To: gcc-patches; +Cc: dje.gcc, Segher Boessenkool
This gives mfcrf a cost of three integer insns, just like we do for sync
and load-with-reservation already.
Tested on powerpc64-linux {-m32,-m64}, applying to trunk.
Segher
2017-11-06 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
TYPE_MFCRF.
---
gcc/config/rs6000/rs6000.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a568c52..c882279 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -35028,6 +35028,8 @@ rs6000_insn_cost (rtx_insn *insn, bool speed)
case TYPE_SYNC:
case TYPE_LOAD_L:
+ case TYPE_MFCR:
+ case TYPE_MFCRF:
cost = COSTS_N_INSNS (n + 2);
break;
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-06 9:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 9:00 [PATCH] rs6000: Implement insn_cost for mfcr, mfcrf Segher Boessenkool
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).