[Bug rtl-optimization/108388] LRA generates RTL that violates constraints
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108388 pkoning at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #3 from pkoning at gcc dot gnu.org --- Looks good. I confirmed that pdp11 GCC with default LRA now builds properly, and my standard test run of the GCC test suite (compile tests) looks good. Essentially the same pass/fail numbers (mostly pass, though I have work to do) as in runs last year with reload as the default.
[Bug rtl-optimization/108388] LRA generates RTL that violates constraints
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108388 --- Comment #2 from CVS Commits --- The master branch has been updated by Vladimir Makarov : https://gcc.gnu.org/g:265a749f290f7c6adc9a3aaa9c585b498a8a38ea commit r13-5332-g265a749f290f7c6adc9a3aaa9c585b498a8a38ea Author: Vladimir N. Makarov Date: Tue Jan 24 16:10:59 2023 -0500 LRA: Always do elimination and only for hard register to check insn constraints LRA does elimination but not always checks insn constraints in this case. This results in LRA failure for PDP11 target whose addition is only 2-op insn. The same might happen for other analogous targets. The patch fixes this problem. PR rtl-optimization/108388 gcc/ChangeLog: * lra-constraints.cc (get_hard_regno): Remove final_p arg. Always do elimination but only for hard register. (operands_match_p, uses_hard_regs_p, process_alt_operands): Adjust calls of get_hard_regno. gcc/testsuite/ChangeLog: * gcc.target/pdp11/pdp11.exp: New. * gcc.target/pdp11/pr108388.c: New.
[Bug rtl-optimization/108388] LRA generates RTL that violates constraints
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108388 --- Comment #1 from Vladimir Makarov --- Thank you for reporting this. I've been working on this PR. I believe the PR reveals the problem not only for PDP11. I guess the same can happen for some other targets. I hope the patch will be ready the next week as it requires a good testing for several major targets. Unfortunately, practically any change in LRA might have unexpected effect on other targets.