[PATCH] rs6000: Implement insn_cost for mfcr, mfcrf
Segher Boessenkool
segher@kernel.crashing.org
Mon Nov 6 09:00:00 GMT 2017
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
More information about the Gcc-patches
mailing list