From: Segher Boessenkool Date: Thu, 7 May 2020 23:31:27 +0000 (-0500) Subject: rs6000: New insns setnbc and setnbcr X-Git-Tag: upstream/12.2.0~16765 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=057e1eedac864342866393f260295b2c73718595;p=platform%2Fupstream%2Fgcc.git rs6000: New insns setnbc and setnbcr setnbc[r] is like setbc[r], but it writes -1 instead of 1 to the GPR. 2020-05-07 Segher Boessenkool * config/rs6000/rs6000.md (*setnbc_signed_): New define_insn. (*setnbcr_signed_): New define_insn. (*neg_eq_): Avoid for TARGET_FUTURE; add missing && 1. (*neg_ne_): Likewise. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a161162..36226e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2020-05-07 Segher Boessenkool + * config/rs6000/rs6000.md (*setnbc_signed_): New + define_insn. + (*setnbcr_signed_): New define_insn. + (*neg_eq_): Avoid for TARGET_FUTURE; add missing && 1. + (*neg_ne_): Likewise. + +2020-05-07 Segher Boessenkool + * config/rs6000/rs6000.md (setbc_signed_): New define_insn. (*setbcr_signed_): Likewise. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index e8dc576..c02c2e1 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5157,6 +5157,25 @@ "setbcr %0,%j1" [(set_attr "type" "isel")]) +; Set Negative Boolean Condition (Reverse) +(define_insn "*setnbc_signed_" + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") + (neg:GPR (match_operator:GPR 1 "scc_comparison_operator" + [(match_operand:CCEITHER 2 "cc_reg_operand" "y") + (const_int 0)])))] + "TARGET_FUTURE" + "setnbc %0,%j1" + [(set_attr "type" "isel")]) + +(define_insn "*setnbcr_signed_" + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") + (neg:GPR (match_operator:GPR 1 "scc_rev_comparison_operator" + [(match_operand:CCEITHER 2 "cc_reg_operand" "y") + (const_int 0)])))] + "TARGET_FUTURE" + "setnbcr %0,%j1" + [(set_attr "type" "isel")]) + ;; Floating point conditional move (define_expand "movcc" [(set (match_operand:SFDF 0 "gpc_reg_operand") @@ -12062,9 +12081,9 @@ (clobber (match_scratch:P 3 "=r")) (clobber (match_scratch:P 4 "=r")) (clobber (reg:P CA_REGNO))] - "" + "!TARGET_FUTURE" "#" - "" + "&& 1" [(parallel [(set (match_dup 4) (plus:P (match_dup 3) (const_int -1))) @@ -12094,9 +12113,9 @@ (clobber (match_scratch:P 3 "=r")) (clobber (match_scratch:P 4 "=r")) (clobber (reg:P CA_REGNO))] - "" + "!TARGET_FUTURE" "#" - "" + "&& 1" [(parallel [(set (match_dup 4) (neg:P (match_dup 3))) (set (reg:P CA_REGNO)