re PR middle-end/38878 (gcc.dg/tree-ssa/foldaddr-1.c XFAILed)
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 Mar 2011 20:12:16 +0000 (21:12 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 14 Mar 2011 20:12:16 +0000 (21:12 +0100)
commit2e64f8b8f6e40ba69829f030eb9bf7220ae39bb3
tree616419a240f8d7d0dc79298ff66f5f5b9b80dfc8
parentde888d9027079b9a38b068a4c58a8563a4a4d600
re PR middle-end/38878 (gcc.dg/tree-ssa/foldaddr-1.c XFAILed)

PR middle-end/38878
* fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Add
STRIP_NOPS on arg0 and arg1.  When optimizing X +- C == X
and C - X == X also strip nops from +/-/p+ operand.
When optimizing -X == C, fold C to arg0's type.

* gcc.dg/tree-ssa/foldaddr-1.c: Remove xfail.

From-SVN: r170957
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/foldaddr-1.c