https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125173
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Stefan Schulze Frielinghaus <[email protected]>: https://gcc.gnu.org/g:107d2ad166d09883b43ec1a5cf1e37c68b134a93 commit r17-1508-g107d2ad166d09883b43ec1a5cf1e37c68b134a93 Author: Stefan Schulze Frielinghaus <[email protected]> Date: Fri Jun 12 11:15:14 2026 +0200 ira: Allow multiple uses within an insn [PR125173] For the attached test we end up during IRA with 6: r99:DI=`s' REG_EQUIV `s' 7: {[`b']=asm_operands; [const(`s'+0x4)]=asm_operands; [`a']=asm_operands;clobber flags:CC;} REG_DEAD r99:DI REG_UNUSED flags:CC where r99 is used in each asm_operands (mem/c:SI (plus:DI (reg/f:DI 99) (const_int 4 [0x4])) [2 s.d+0 S4 A32]) This in turn means that we hit multiple times the very same insn while iterating over all uses of r99 which in the end triggers the assert. This patch relaxes the assert since what we want to ensure here is that a register is not used by multiple insns since otherwise we cannot trivially move or delete the definition. PR rtl-optimization/125173 gcc/ChangeLog: * ira.cc (combine_and_move_insns): Allow multiple uses within an insn. gcc/testsuite/ChangeLog: * gcc.dg/pr125173-1.c: New test.
