* [PATCH]rs6000: remove unused splitter on const_scalar_int_operand
@ 2022-08-30 9:44 Jiufu Guo
2022-09-01 23:21 ` Segher Boessenkool
0 siblings, 1 reply; 2+ messages in thread
From: Jiufu Guo @ 2022-08-30 9:44 UTC (permalink / raw)
To: gcc-patches; +Cc: segher, dje.gcc, linkw, guojiufu
Hi,
There are two splitters, both are calling rs6000_emit_set_const to emit
instructions for constant building.
One splitter checks `const_int_operand`, this splitter is always used.
Another spitter checks `const_scalar_int_operand`, this one is never
used now.
Checking the history, that splitter is introduced around 1999 for
HOST_BITS_PER_WIDE_INT=32, as below:
(define_split
[(set (match_operand:DI 0 "gpc_reg_operand" "")
(match_operand:DI 1 "const_double_operand" ""))]
"HOST_BITS_PER_WIDE_INT == 32 && TARGET_POWERPC64
&& num_insns_constant (operands[1], DImode) > 1"
And `HOST_BITS_PER_WIDE_INT == 32` is eliminated later, since it is
`const_double_operand` can cover it.
When wide_int is introduced, `const_double_operand` is replaced by
`const_scalar_int_operand`.
Now, HOST_BITS_PER_WIDE_INT is forced to 64, this splitter is safe
to remove.
Bootstrap and regtest pass on ppc64 and ppc64le.
Is this ok for trunk?
BR,
Jeff
gcc/ChangeLog:
* config/rs6000/rs6000.md (const_scalar_int splitter): Remove.
---
gcc/config/rs6000/rs6000.md | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index e9e5cd1e54d..2a177936689 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9717,19 +9717,6 @@ (define_split
FAIL;
})
-(define_split
- [(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)))]
-{
- if (rs6000_emit_set_const (operands[0], operands[1]))
- DONE;
- else
- FAIL;
-})
-
(define_split
[(set (match_operand:DI 0 "altivec_register_operand")
(match_operand:DI 1 "s5bit_cint_operand"))]
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]rs6000: remove unused splitter on const_scalar_int_operand
2022-08-30 9:44 [PATCH]rs6000: remove unused splitter on const_scalar_int_operand Jiufu Guo
@ 2022-09-01 23:21 ` Segher Boessenkool
0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2022-09-01 23:21 UTC (permalink / raw)
To: Jiufu Guo; +Cc: gcc-patches, dje.gcc, linkw
Hi!
On Tue, Aug 30, 2022 at 05:44:26PM +0800, Jiufu Guo wrote:
> There are two splitters, both are calling rs6000_emit_set_const to emit
> instructions for constant building.
> One splitter checks `const_int_operand`, this splitter is always used.
> Another spitter checks `const_scalar_int_operand`, this one is never
> used now.
> Now, HOST_BITS_PER_WIDE_INT is forced to 64, this splitter is safe
> to remove.
Okay for trunk. Thanks!
Segher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-01 23:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 9:44 [PATCH]rs6000: remove unused splitter on const_scalar_int_operand Jiufu Guo
2022-09-01 23:21 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).