]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix invalid subregs in xorsign [PR118501]
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 20 Jan 2025 19:52:31 +0000 (19:52 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 20 Jan 2025 19:52:31 +0000 (19:52 +0000)
commit6612b8e55471fabd2071a9637a06d3ffce2b05a6
treec456fdd667754bb0068adc752005bbc15d7778e3
parent1b8820421488d220a95f651b51175d618063c48c
aarch64: Fix invalid subregs in xorsign [PR118501]

In the testcase, we try to use xorsign on:

   (subreg:DF (reg:TI R) 8)

i.e. the highpart of the TI.  xorsign wants to take a V2DF
paradoxical subreg of this, which is rightly rejected as a direct
operation.  In cases like this, we need to force the highpart into
a fresh register first.

gcc/
PR target/118501
* config/aarch64/aarch64.md (@xorsign<mode>3): Use
force_lowpart_subreg.

gcc/testsuite/
PR target/118501
* gcc.c-torture/compile/pr118501.c: New test.
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.c-torture/compile/pr118501.c [new file with mode: 0644]