https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116994
Davide Italiano <dccitaliano at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lingling.kong7 at gmail dot com --- Comment #2 from Davide Italiano <dccitaliano at gmail dot com> --- This bisects to: commit d826f7945609046f922732b138fb90795d5b1985 Author: konglin1 <lingling.k...@intel.com> Date: Wed May 8 15:46:10 2024 +0800 x86: Fix cmov cost model issue [PR109549] (if_then_else:SI (eq (reg:CCZ 17 flags) (const_int 0 [0])) (reg/v:SI 101 [ e ]) (reg:SI 102)) The cost is 8 for the rtx, the cost for (eq (reg:CCZ 17 flags) (const_int 0 [0])) is 4, but this is just an operator do not need to compute it's cost in cmov. gcc/ChangeLog: PR target/109549 * config/i386/i386.cc (ix86_rtx_costs): The XEXP (x, 0) for cmov is an operator do not need to compute cost. gcc/testsuite/ChangeLog: * gcc.target/i386/cmov6.c: Fixed. gcc/config/i386/i386.cc | 2 +- gcc/testsuite/gcc.target/i386/cmov6.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-)