]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: force operand to fresh register to avoid subreg issues [PR118892]
authorTamar Christina <tamar.christina@arm.com>
Tue, 4 Mar 2025 11:15:26 +0000 (11:15 +0000)
committerTamar Christina <tamar.christina@arm.com>
Tue, 4 Mar 2025 11:15:52 +0000 (11:15 +0000)
commitd883f3233c4b7e0dce52539a12dfcccc8aff43e4
tree2f28ac04844632f1b7f997fa443216cd4997deb7
parentac16d6d74fcb4ca10c939b00782b4dfada666273
aarch64: force operand to fresh register to avoid subreg issues [PR118892]

When the input is already a subreg and we try to make a paradoxical
subreg out of it for copysign this can fail if it violates the subreg
relationship.

Use force_lowpart_subreg instead of lowpart_subreg to then force the
results to a register instead of ICEing.

gcc/ChangeLog:

PR target/118892
* config/aarch64/aarch64.md (copysign<GPF:mode>3): Use
force_lowpart_subreg instead of lowpart_subreg.

gcc/testsuite/ChangeLog:

PR target/118892
* gcc.target/aarch64/copysign-pr118892.c: New test.
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.target/aarch64/copysign-pr118892.c [new file with mode: 0644]