------- Comment #18 from dje at gcc dot gnu dot org 2008-05-02 17:36 -------
Yes, the patch works, modulo typos.
if (GET_CODE (ops[n_ops - 1].op) == CONST_INT)
i = n_ops - 2;
else
i = n_ops - 1;
if (i >= 1
&& ops[i].neg
&& !ops[i - 1].neg
&& CONSTANT_P (ops[i].op)
&& GET_CODE (ops[i].op) == GET_CODE (ops[i - 1].op))
{
ops[i - 1].op = gen_rtx_MINUS (mode, ops[i - 1].op, ops[i].op);
ops[i - 1].op = gen_rtx_CONST (mode, ops[i - 1].op);
if (i < n_ops - 1)
ops[i] = ops[i + 1];
n_ops--;
}
plus_constant strips the inner CONST and the earlier version also wrapped
everything in CONST.
Does it make sense to group any two RTX_CONST_OBJ together of not the same
type?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36090