This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 23 Nov 2016 20:00:30 +0100
- Subject: Re: [0/3] Fix PR78120, in ifcvt/rtlanal/i386.
- Authentication-results: sourceware.org; auth=none
- References: <e6d06b7a-831b-299a-5c5a-507e267238a4@redhat.com>
Note that I misspelled the PR number in the 0/3 message :-/
On 11/23/2016 07:57 PM, Bernd Schmidt wrote:
1. I noticed comparisons between set_src_cost and set_rtx_cost seemed to
be invalid. There seems to be no good reason that insn_rtx_cost
shouldn't use the latter. It also makes the numbers comparable to the
ones you get from seq_cost.
Bernd
PR rtl-optimization/78120
* rtlanal.c (insn_rtx_cost): Use set_rtx_cost.
Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c (revision 242038)
+++ gcc/rtlanal.c (working copy)
@@ -5211,7 +5211,7 @@ insn_rtx_cost (rtx pat, bool speed)
else
return 0;
- cost = set_src_cost (SET_SRC (set), GET_MODE (SET_DEST (set)), speed);
+ cost = set_rtx_cost (set, speed);
return cost > 0 ? cost : COSTS_N_INSNS (1);
}