aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/module.cc
diff options
context:
space:
mode:
authorHongyu Wang <hongyu.wang@intel.com>2024-06-13 00:18:32 +0800
committerHongyu Wang <hongyu.wang@intel.com>2024-06-13 22:04:08 +0800
commit83a765768510d1f329887116757d6818d7846717 (patch)
tree85884f9afdae7599d7c721ad8d27e7cae21a1944 /gcc/cp/module.cc
parent7fed7e9bbc57d502e141e079a6be2706bdbd4560 (diff)
downloadgcc-83a765768510d1f329887116757d6818d7846717.zip
gcc-83a765768510d1f329887116757d6818d7846717.tar.gz
gcc-83a765768510d1f329887116757d6818d7846717.tar.bz2
[APX CCMP] Add targetm.have_ccmp hook [PR115370]
In cfgexpand, there is an optimization for branch which tests targetm.gen_ccmp_first == NULL. However for target like x86-64, the hook was implemented but it does not indicate that ccmp was enabled. Add a new target hook TARGET_HAVE_CCMP and replace the middle-end check for the existance of gen_ccmp_first to avoid misoptimization. gcc/ChangeLog: PR target/115370 PR target/115463 * target.def (have_ccmp): New target hook. * targhooks.cc (default_have_ccmp): New function. * targhooks.h (default_have_ccmp): New prototype. * doc/tm.texi.in: Add TARGET_HAVE_CCMP. * doc/tm.texi: Regenerate. * cfgexpand.cc (expand_gimple_cond): Call targetm.have_ccmp instead of checking if targetm.gen_ccmp_first exists. * expr.cc (expand_expr_real_gassign): Likewise. * config/i386/i386.cc (ix86_have_ccmp): New target hook to check if APX_CCMP enabled. (TARGET_HAVE_CCMP): Define.
Diffstat (limited to 'gcc/cp/module.cc')
0 files changed, 0 insertions, 0 deletions