rs6000: Implement insn_cost for mfcr, mfcrf

This gives mfcrf a cost of three integer insns, just like we do for sync
and load-with-reservation already.


	* config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
	TYPE_MFCRF.

From-SVN: r254439
This commit is contained in:
Segher Boessenkool 2017-11-06 10:04:23 +01:00 committed by Segher Boessenkool
parent 23dbc16908
commit c3e150d23a
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-11-06 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
TYPE_MFCRF.
2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vrp.c (vrp_int_const_binop): Return true on success and

View File

@ -35038,6 +35038,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;