https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109520
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Vladimir Makarov <vmaka...@gcc.gnu.org>: https://gcc.gnu.org/g:b175b4887f928118af997f6d4d75097a64dcec5d commit r14-2500-gb175b4887f928118af997f6d4d75097a64dcec5d Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Thu Jul 13 10:42:17 2023 -0400 [RA][PR109520]: Catch error when there are no enough registers for asm insn Asm insn unlike other insns can have so many operands whose constraints can not be satisfied. It results in LRA cycling for such test case. The following patch catches such situation and reports the problem. PR middle-end/109520 gcc/ChangeLog: * lra-int.h (lra_insn_recog_data): Add member asm_reloads_num. (lra_asm_insn_error): New prototype. * lra.cc: Include rtl_error.h. (lra_set_insn_recog_data): Initialize asm_reloads_num. (lra_asm_insn_error): New func whose code is taken from ... * lra-assigns.cc (lra_split_hard_reg_for): ... here. Use lra_asm_insn_error. * lra-constraints.cc (curr_insn_transform): Check reloads nummber for asm. gcc/testsuite/ChangeLog: * gcc.target/i386/pr109520.c: New test.