On Thu, Dec 07, 2017 at 09:28:32PM +0100, Marc Glisse wrote:
> On Thu, 7 Dec 2017, Jakub Jelinek wrote:
> 
> > When committing the previous PR81281 patch, I've removed all the @@0 cases
> > on plus:c, used @0 instead, to make sure we don't regress.
> > 
> > This patch readds those where possible.  For the cases where there is
> > just P and A, it was mostly a matter of @@0 and convert? instead of convert
> > plus using type from @1 instead of @0, though if @0 is INTEGER_CST, what we
> > usually end up with is a (plus (convert (plus @1 @0) @2) where @2 negated
> > is equal to @0, so the patch adds a simplification for that too.
> 
> There may be a bit of overlap with "(A +- CST1) +- CST2 -> A + CST3"
> elsewhere in the file. Do you think there is a convenient way to generalize
> it so it also covers this case, or does it look better to keep them
> separate? (I haven't had time to study your recent patches yet, so I don't

I don't think it is similar enough to what this pattern does, both solve
quite different problems, have quite different tests and pretty much nothing
shareable.

        Jakub

Reply via email to