[simplify-rtx][2/2] Simplify - (y ? -x : x) -> (!y ? -x : x)
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 20 Jul 2015 12:51:45 +0000 (12:51 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 20 Jul 2015 12:51:45 +0000 (12:51 +0000)
commit7040e90366fe1e8d4d78564335f3b3ea8e55234b
treeb199851fd64c33575ae6c054bb768b03fabaf4d8
parent232c93296dd97e3b300fc61f0f4ea79be4faf963
[simplify-rtx][2/2] Simplify - (y ? -x : x) -> (!y ? -x : x)

* simplify-rtx.c (simplify_unary_operation_1, NEG case):
(neg (x ? (neg y) : y)) -> !x ? (neg y) : y.

* gcc.target/aarch64/neg_abs_1.c: New test.

From-SVN: r225997
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/neg_abs_1.c [new file with mode: 0644]