[RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when conditional...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 30 Sep 2016 08:28:09 +0000 (08:28 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Fri, 30 Sep 2016 08:28:09 +0000 (08:28 +0000)
commitfa16a27195c8862806f1483026fa1fbba8315afb
tree3401764d8b64ceb5227992f3073cb56c9c9b481c
parentc9ff08a76360616f61398b991315a8f5c23958ce
[RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when conditional negation is available

        * ifcvt.c (noce_try_avoid_const_materialization): New function.
        (noce_process_if_block): Use it.

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

From-SVN: r240649
gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/ifcvt_avoid_const_materialization_1.c [new file with mode: 0644]