]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
optabs: Remove cmov optab [PR120230]
authorAndrew Pinski <quic_apinski@quicinc.com>
Mon, 12 May 2025 05:11:38 +0000 (22:11 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 12 May 2025 22:16:12 +0000 (15:16 -0700)
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 <quic_apinski@quicinc.com>
gcc/optabs.cc
gcc/optabs.def
gcc/optabs.h

index 0a14b1eef8a5795e6fd24ade6da55841696315b8..fe68a25ffd43bde0d53423108ea40fe9382e3407 100644 (file)
@@ -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);
index 23f792352388dd5f8de8a1999643179328214abf..0c1435d4ecd78e8a28de06d30706d2913622f3e8 100644 (file)
@@ -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")
index 23fa77be24eaf1afd5cdf9ca35e3b5895f6bb967..ae525c848d3278e6538c1cad80e0065e24b6ae58 100644 (file)
@@ -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
 };