"Rahul Kharche" <ra...@icerasemi.com> writes:
> GCSE won't help with your trimmed down example
>
> int main(void)
> {
>     long a = 0xcafecafe;
>
>     printf("Final: %lx %lx %lx\n", a, a+5, a+15);
>     return EXIT_SUCCESS;
> }
>
> I believe Paolo's canon_reg solution together with tweaking
> rtx_cost of constants with outer code PLUS might help. Any
> luck with that pass?

As I understand Paolo's change is to move some of the functionality from cse.c
to a new LCM pass.  However cse.c does not handle the above yet.

I am actually looking at something similar for PR33699 for MIPS.  My plan is
to experiment extending cse.c with putting "anchor" constants to the available
expressions along with the original constant and then querying those later for
constant expressions.

Adam

Reply via email to