Revision r226491 : [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. introduced following testsuite failures on x86: FAIL: gcc.target/i386/cmov2.c scan-assembler sbb FAIL: gcc.target/i386/cmov3.c scan-assembler cmov[^3] The report and a discussion is at [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00056.html
Mine.
Author: ktkachov Date: Thu Aug 13 09:11:13 2015 New Revision: 226853 URL: https://gcc.gnu.org/viewcvs?rev=226853&root=gcc&view=rev Log: [RTL-ifcvt] Improve conditional select ops on immediates (fix failing x86_64 cmov tests) PR rtl-optimization/67103 * ifcvt.c (noce_try_store_flag_constants): Move x = (-(test != 0) & (b - a)) + a transformation to... (noce_try_cmove): ... Here. Try it if normal conditional move fails. Modified: trunk/gcc/ChangeLog trunk/gcc/ifcvt.c
Fixed.