[RTL-ifcvt] Improve conditional select ops on immediates
commita929e016e15c149e41b913080aabb76e70aefd33
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Aug 2015 08:14:42 +0000 (3 08:14 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Aug 2015 08:14:42 +0000 (3 08:14 +0000)
tree826e24effa94dee676cf043a311912c2d3c9f2ce
parent5a0909a38ff0064310ac903621471428edbc57de
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226491 138bc75d-0d04-0410-961f-82ee72b054a4
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]