From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2066) id C077D385AC1C; Wed, 7 Sep 2022 05:22:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C077D385AC1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662528134; bh=xMVZWVt7F5W/YMErTQ0puAWeVSFqbgIlQM74sH8b05Y=; h=From:To:Subject:Date:From; b=faY0BjWcvI2+fCi0UhHAvrj0/4ZxOh78QJ2W+oXbL6JRkJanulQ6GtMqfPaNIxzIJ yWInkiB7hJwzYwe56IkWnZfqbNokwibm3I7m8uLzXZ69HCx1yYYpSKnpgt19fuRSNW hC308n583GVk/a9o9mtnzOSHLmZGzZBzHJhhi6dg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jiu Fu Guo To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2506] rs6000: fix misleading new patterns of splitters X-Act-Checkin: gcc X-Git-Author: Jiufu Guo X-Git-Refname: refs/heads/master X-Git-Oldrev: c0852b51b7a68ada822955eb7ef83d933cc33e47 X-Git-Newrev: 34ea461fdb471b4d9afa555da69dbc6d02713c54 Message-Id: <20220907052214.C077D385AC1C@sourceware.org> Date: Wed, 7 Sep 2022 05:22:14 +0000 (GMT) List-Id: https://gcc.gnu.org/g:34ea461fdb471b4d9afa555da69dbc6d02713c54 commit r13-2506-g34ea461fdb471b4d9afa555da69dbc6d02713c54 Author: Jiufu Guo Date: Thu Aug 11 20:01:28 2022 +0800 rs6000: fix misleading new patterns of splitters 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. Diff: --- gcc/config/rs6000/rs6000.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index e9e5cd1e54d..85b97389d82 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -7773,11 +7773,7 @@ [(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; @@ -9708,8 +9704,7 @@ [(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; @@ -9721,8 +9716,7 @@ [(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;