[PATCH] Improve EQ_EXPR/NE_EXPR folding (PR middle-end/38878)

Geert Bosch bosch@adacore.com
Sat Feb 5 02:18:00 GMT 2011


On Feb 3, 2011, at 13:11, Jakub Jelinek wrote:
> == and != doesn't care about signedness of the operands, so we
> can IMHO use STRIP_NOPS instead of just STRIP_SIGN_NOPS.
> Additionally, for X +- C == X and C - X == X folding we can also
> strip nops from the +/-/p+ operand for the purpose of operand_equal_p
> checking.  This together fixes PR38878 regression (P2), though I'm
> not 100% sure we want to do that this late, perhaps we can defer
> it till stage1.

I guess something similar might be going on with PR47004.
Would you might having a look? This is a very local language
independent missed optimization.

  -Geert



More information about the Gcc-patches mailing list