[Bug target/114810] [14 Regression] internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1868 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -m32 -mstackrealign
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114810 --- Comment #4 from Uroš Bizjak --- An interesting observation, when the insn is defined only with problematic alternative: (define_insn_and_split "*andn3_doubleword_bmi" [(set (match_operand: 0 "register_operand" "=") (and: (not: (match_operand: 1 "register_operand" "r")) (match_operand: 2 "nonimmediate_operand" "ro"))) (clobber (reg:CC FLAGS_REG))] the compilation succeeds, and a spill to memory is emitted: (insn 1170 65 1177 7 (set (mem/c:DI (plus:SI (reg/f:SI 6 bp) (const_int -168 [0xff58])) [71 %sfp+-144 S8 A64]) (reg:DI 0 ax [orig:217 _13 ] [217])) "pr114810.C":296:36 84 {*movdi_internal} (nil)) ... (insn 987 1154 7 (parallel [ (set (reg:DI 3 bx [453]) (and:DI (not:DI (reg:DI 0 ax [452])) (mem/c:DI (plus:SI (reg/f:SI 6 bp) (const_int -168 [0xff58])) [71 %sfp+-144 S8 A64]))) (clobber (reg:CC 17 flags)) ]) "pr114810.C":296:6 703 {*andndi3_doubleword_bmi} (nil))
[Bug target/114810] [14 Regression] internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1868 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -m32 -mstackrealign
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114810 Uroš Bizjak changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2024-04-22 Ever confirmed|0 |1 --- Comment #3 from Uroš Bizjak --- It is alternative 0 (=,r,ro) that causes the spill failure. Following definition works OK: (define_insn_and_split "*andn3_doubleword_bmi" [(set (match_operand: 0 "register_operand" "=r,r") (and: (not: (match_operand: 1 "register_operand" "0,r")) (match_operand: 2 "nonimmediate_operand" "ro,0"))) (clobber (reg:CC FLAGS_REG))] and compiles to: (insn 1150 1108 987 7 (set (reg:DI 2 cx [453]) (reg:DI 3 bx [452])) "pr114810.C":296:6 84 {*movdi_internal} (nil)) (insn 987 1150 1151 7 (parallel [ (set (reg:DI 2 cx [453]) (and:DI (not:DI (reg:DI 2 cx [453])) (reg:DI 0 ax [orig:217 _13 ] [217]))) (clobber (reg:CC 17 flags)) ]) "pr114810.C":296:6 703 {*andndi3_doubleword_bmi} (nil))
[Bug target/114810] [14 Regression] internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1868 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -m32 -mstackrealign
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114810 Jakub Jelinek changed: What|Removed |Added Target Milestone|--- |14.0 Priority|P3 |P1 CC||jakub at gcc dot gnu.org, ||uros at gcc dot gnu.org, ||vmakarov at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Started with r14-5109-ga291237b628f419d7f7ac264dd7b42947b565222 which means it was latent before. I need -m32 -mstackrealign -O2 -mbmi -fno-exceptions -fno-plt -fpie -march=x86-64 -w to reproduce.
[Bug target/114810] [14 Regression] internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1868 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -m32 -mstackrealign
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114810 --- Comment #1 from Kostadin Shishmanov --- Created attachment 58011 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58011=edit reduced testcase