Message ID | 1712766.eG3y3HtxQQ@polaris |
---|---|
State | New |
Headers | show |
On Mon, Nov 30, 2015 at 4:44 AM, Eric Botcazou <ebotcazou@adacore.com> wrote: >> Note this also is wrong on PA and one of the SPARC adjust_cost macros. > > Thanks for the heads up, fixed thusly, applied on the mainline > > > PR target/28115 > * config/sparc/sparc.c (supersparc_adjust_cost): Fix thinko. > (sparc_adjust_cost): Add missing space. Eric, FYI, the function should test recog_memoized (dep_insn) also. - David
> FYI, the function should test recog_memoized (dep_insn) also.
I don't think that's needed as it doesn't call get_attr_type on dep_insn.
Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 231010) +++ config/sparc/sparc.c (working copy) @@ -9353,8 +9353,8 @@ supersparc_adjust_cost (rtx_insn *insn, { enum attr_type insn_type; - if (! recog_memoized (insn)) - return 0; + if (recog_memoized (insn) < 0) + return cost; insn_type = get_attr_type (insn); @@ -9487,7 +9487,7 @@ hypersparc_adjust_cost (rtx_insn *insn, } static int -sparc_adjust_cost(rtx_insn *insn, rtx link, rtx_insn *dep, int cost) +sparc_adjust_cost (rtx_insn *insn, rtx link, rtx_insn *dep, int cost) { switch (sparc_cpu) {
> Note this also is wrong on PA and one of the SPARC adjust_cost macros. Thanks for the heads up, fixed thusly, applied on the mainline PR target/28115 * config/sparc/sparc.c (supersparc_adjust_cost): Fix thinko. (sparc_adjust_cost): Add missing space.