[RTL-ifcvt] Improve conditional select ops on immediates
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 3 Aug 2015 08:14:42 +0000 (08:14 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 3 Aug 2015 08:14:42 +0000 (08:14 +0000)
commit44fef04ab18f57111e7d9f7dcd88d76a3c7bfc09
tree826e24effa94dee676cf043a311912c2d3c9f2ce
parent03038b8b7ad8e68a203cecdc43a44ee5ddbb7f6f
[RTL-ifcvt] Improve conditional select ops on immediates

* ifcvt.c (noce_try_store_flag_constants): Make logic of the case
when diff == STORE_FLAG_VALUE or diff == -STORE_FLAG_VALUE more
explicit.  Prefer to add the flag whenever possible.
(noce_process_if_block): Try noce_try_store_flag_constants before
noce_try_cmove.

* gcc.target/aarch64/csel_bfx_1.c: New test.
* gcc.target/aarch64/csel_imms_inc_1.c: Likewise.

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