On Aug 10, 2005, at 12:43 PM, Fariborz Jahanian wrote:
> + /* APPLE LOCAL begin radar 4153339 */
> + if (n_sets == 1 && GET_CODE (sets[i].src) == REG
> + && src_const && GET_CODE (src_const) == CONST_DOUBLE)
> + {
> + src_folded = src_const;
> + src_folded_cost = src_folded_regcost = -1;
> + }
> + /* APPLE LOCAL end radar 4153339 */
I don't see how this could be right for FSF gcc. It's putting a
target specific decision into the target independent code. It is
simply not true that a constant double is always cheaper than a
register, for example. The similar case you cite, of the indirect
jump insn, really is target independent--a branch to a known
destination is always going to be cheaper than an indirect branch via
a register.
It seems possible that this could be fixed by adjusting the cost of
the CONST_DOUBLE in the target backend.
Ian