]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: fix misleading new patterns of splitters
authorJiufu Guo <guojiufu@linux.ibm.com>
Thu, 11 Aug 2022 12:01:28 +0000 (20:01 +0800)
committerJiufu Guo <guojiufu@linux.ibm.com>
Wed, 7 Sep 2022 05:21:56 +0000 (13:21 +0800)
As a comment in
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599556.html

Those splitters call rs6000_emit_set_const directly, and the replacements
are never used.  Using (pc) would be less misleading.

gcc/ChangeLog:

* config/rs6000/rs6000.md: (constant splitters): Use "(pc)" as the
replacements.

gcc/config/rs6000/rs6000.md

index e9e5cd1e54db1a022e118a76fc3f6af654c9c61c..85b97389d82c419fad7a0b787bb045968eee64d0 100644 (file)
   [(set (match_operand:SI 0 "gpc_reg_operand")
        (match_operand:SI 1 "const_int_operand"))]
   "num_insns_constant (operands[1], SImode) > 1"
-  [(set (match_dup 0)
-       (match_dup 2))
-   (set (match_dup 0)
-       (ior:SI (match_dup 0)
-               (match_dup 3)))]
+  [(pc)]
 {
   if (rs6000_emit_set_const (operands[0], operands[1]))
     DONE;
   [(set (match_operand:DI 0 "int_reg_operand_not_pseudo")
        (match_operand:DI 1 "const_int_operand"))]
   "TARGET_POWERPC64 && num_insns_constant (operands[1], DImode) > 1"
-  [(set (match_dup 0) (match_dup 2))
-   (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))]
+  [(pc)]
 {
   if (rs6000_emit_set_const (operands[0], operands[1]))
     DONE;
   [(set (match_operand:DI 0 "int_reg_operand_not_pseudo")
        (match_operand:DI 1 "const_scalar_int_operand"))]
   "TARGET_POWERPC64 && num_insns_constant (operands[1], DImode) > 1"
-  [(set (match_dup 0) (match_dup 2))
-   (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))]
+  [(pc)]
 {
   if (rs6000_emit_set_const (operands[0], operands[1]))
     DONE;