This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Rewrite store-motion and invariant motion to use an alias-oracle
> > > (maybe there's a better place to do it, but it really needs to be
> > > done on the leaf of expanded expressions).
> > right... still, this seems to be equivalent to transforming
> > unsigned char a, b;
> > (unsigned long) (a + b) to (unsigned long) a + (unsigned long) b
> > which is incorrect when a + b overflows?
> Yes. I was assuming the affine combinations are all address arithmetic
> where overflow is undefined or rather does not occur.
no, not necessarily. However, you could call aff_combination_expand
with type = TREE_TYPE (TREE_OPERAND (e, 0)) and make it indicate whether
it expanded some possibly wrapping arithmetics or not, and in case it
did not, cast the result to TREE_TYPE (e).
> Of course unfortunately the ICE that blocks the patch in the first
> place is present with and without that change :/
I will have a look,