]> gcc.gnu.org Git - gcc.git/commit
aarch64: Fix aarch64_ldp_reg_operand predicate not to allow all subreg [PR113221]
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 16 Jan 2024 23:37:49 +0000 (15:37 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 17 Jan 2024 22:03:19 +0000 (14:03 -0800)
commit7a8124e341aebcc544b4720e920b625f4ffe4e8a
tree424cbcf02e2ac1300a4232c656ce8e4626dc0b31
parent3340878009acfc69f5315386437841a277174c83
aarch64: Fix aarch64_ldp_reg_operand predicate not to allow all subreg [PR113221]

So the problem here is that aarch64_ldp_reg_operand will all subreg even subreg of lo_sum.
When LRA tries to fix that up, all things break. So the fix is to change the check to only
allow reg and subreg of regs.

Note the tendancy here is to use register_operand but that checks the mode of the register
but we need to allow a mismatch modes for this predicate for now.

Built and tested for aarch64-linux-gnu with no regressions
(Also tested with the LD/ST pair pass back on).

PR target/113221

gcc/ChangeLog:

* config/aarch64/predicates.md (aarch64_ldp_reg_operand): For subreg,
only allow REG operands instead of allowing all.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr113221-1.c: New test.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/config/aarch64/predicates.md
gcc/testsuite/gcc.c-torture/compile/pr113221-1.c [new file with mode: 0644]
This page took 0.061618 seconds and 6 git commands to generate.