diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-07-10 17:01:29 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-07-10 17:01:29 +0100 |
commit | 9d20529d94b23275885f380d155fe8671ab5353a (patch) | |
tree | 359bdd40cbbfece37d81423527ee117cf053b47d /gcc/c | |
parent | e08ebd7d77a216ee2313b585c370333c66497b53 (diff) | |
download | gcc-9d20529d94b23275885f380d155fe8671ab5353a.zip gcc-9d20529d94b23275885f380d155fe8671ab5353a.tar.gz gcc-9d20529d94b23275885f380d155fe8671ab5353a.tar.bz2 |
recog: Handle some mode-changing hardreg propagations
insn_propagation would previously only replace (reg:M H) with X
for some hard register H if the uses of H were also in mode M.
This patch extends it to handle simple mode punning too.
The original motivation was to try to get rid of the execution
frequency test in aarch64_split_simd_shift_p, but doing that is
follow-up work.
I tried this on at least one target per CPU directory (as for
the late-combine patches) and it seems to be a small win for
all of them.
The patch includes a couple of updates to the ia32 results.
In pr105033.c, foo3 replaced:
vmovq 8(%esp), %xmm1
vpunpcklqdq %xmm1, %xmm0, %xmm0
with:
vmovhps 8(%esp), %xmm0, %xmm0
In vect-bfloat16-2b.c, 5 of the vec_extract_v32bf_* routines
(specifically the ones with nonzero even indices) replaced
things like:
movl 28(%esp), %eax
vmovd %eax, %xmm0
with:
vpinsrw $0, 28(%esp), %xmm0, %xmm0
(These functions return a bf16, and so only the low 16 bits matter.)
gcc/
* recog.cc (insn_propagation::apply_to_rvalue_1): Handle simple
cases of hardreg propagation in which the register is set and
used in different modes.
gcc/testsuite/
* gcc.target/i386/pr105033.c: Expect vmovhps for the ia32 version
of foo.
* gcc.target/i386/vect-bfloat16-2b.c: Expect more vpinsrws.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions