From: Andrew Pinski Date: Mon, 12 May 2025 05:11:38 +0000 (-0700) Subject: optabs: Remove cmov optab [PR120230] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=213c64962d24fa8a4b2f3d7a9c5508f9daed9fa2;p=thirdparty%2Fgcc.git optabs: Remove cmov optab [PR120230] cmov optab was added back in r0-24110-g1c0290eaac4094 (https://gcc.gnu.org/pipermail/gcc-patches/1999-September/018596.html) but it was never used. movcc is used instead and since r0-93453-gf90b7a5a7913cc (cond-optab), movcc becomes what cmov_optab was going to be; in having a combined compare and move optab. Note the only target which seems to have implemented this optab is aarch64; will remove that in a different patch. Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/120230 gcc/ChangeLog: * optabs.cc (can_compare_p): Remove support for ccp_cmov. * optabs.def (cmov_optab): Remove. * optabs.h (can_compare_purpose): Remove ccp_cmov. Signed-off-by: Andrew Pinski --- diff --git a/gcc/optabs.cc b/gcc/optabs.cc index 0a14b1eef8a..fe68a25ffd4 100644 --- a/gcc/optabs.cc +++ b/gcc/optabs.cc @@ -4304,9 +4304,6 @@ can_compare_p (enum rtx_code code, machine_mode mode, && (icode = optab_handler (cstore_optab, mode)) != CODE_FOR_nothing && insn_operand_matches (icode, 1, test)) return true; - if (purpose == ccp_cmov - && optab_handler (cmov_optab, mode) != CODE_FOR_nothing) - return true; mode = GET_MODE_WIDER_MODE (mode).else_void (); PUT_MODE (test, mode); diff --git a/gcc/optabs.def b/gcc/optabs.def index 23f79235238..0c1435d4ecd 100644 --- a/gcc/optabs.def +++ b/gcc/optabs.def @@ -294,7 +294,6 @@ OPTAB_D (cond_len_fnms_optab, "cond_len_fnms$a") OPTAB_D (cond_len_neg_optab, "cond_len_neg$a") OPTAB_D (cond_len_one_cmpl_optab, "cond_len_one_cmpl$a") OPTAB_D (vcond_mask_len_optab, "vcond_mask_len_$a") -OPTAB_D (cmov_optab, "cmov$a6") OPTAB_D (cstore_optab, "cstore$a4") OPTAB_D (ctrap_optab, "ctrap$a4") OPTAB_D (addv4_optab, "addv$I$a4") diff --git a/gcc/optabs.h b/gcc/optabs.h index 23fa77be24e..ae525c848d3 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -244,11 +244,10 @@ extern void emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code); extern void emit_libcall_block (rtx_insn *, rtx, rtx, rtx); /* The various uses that a comparison can have; used by can_compare_p: - jumps, conditional moves, store flag operations. */ + jumps, store flag operations. */ enum can_compare_purpose { ccp_jump, - ccp_cmov, ccp_store_flag };