From: Segher Boessenkool Date: Mon, 6 Nov 2017 09:04:23 +0000 (+0100) Subject: rs6000: Implement insn_cost for mfcr, mfcrf X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3e150d23a9b499387397c67c02e3976a37405e6;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5556e296bd6..c4a360fe434 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-06 Segher Boessenkool + + * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and + TYPE_MFCRF. + 2017-11-06 Richard Sandiford * tree-vrp.c (vrp_int_const_binop): Return true on success and diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0eabd5f108c..e3636dc6831 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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;