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 have an opinion)

--
Marc Glisse

Reply via email to