[PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
Paolo Bonzini
paolo.bonzini@lu.unisi.ch
Wed Jan 10 07:17:00 GMT 2007
> You mean something like below (which passed bootstrap on powerpc64-linux
> and is currently regtesting) or something different? If something
> different, I'd really need to know why x86 prefers set X X Y over
> set X Y X to be able to do anything about it.
Yes, mostly (see comments down in the patch). Unless somebody knows why
x86 prefers set X X Y, however, I can only point you to the testcase.
:-( I'm CCing Jan.
> I will note that I actually tried combining swap_commutative_operands_p
> and simplify_plus_minus_op_data_cmp, but I ended up hitting an ICE.
> It ended up optabs.c:emit_cmp_and_jump_insns() doesn't like it when we
> include the sort the REG's heuristic that simplify_plus_minus_op_data_cmp
> has to swap_commutative_operands_p.
Interesting.
> + if (REG_P (op))
> + return (REG_POINTER (op)) ? -1 : -3;
> + else
> + return -2;
Actually, I meant
if (REG_P (op))
return REG_POINTER (op) ? -1 : -2;
else
return -3;
And then swap_commutative_operands_with_target could die entirely.
Paolo
More information about the Gcc-patches
mailing list