https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123320
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Xi Ruoyao <[email protected]>: https://gcc.gnu.org/g:fd7a68146a67c18dccf9445789a68350b859a9b3 commit r16-6558-gfd7a68146a67c18dccf9445789a68350b859a9b3 Author: Xi Ruoyao <[email protected]> Date: Wed Dec 31 09:52:35 2025 +0800 LoongArch: guard SImode simple shift and arithmetic expansions with can_create_pseudo_p [PR 123320] As we have hardware instructions for those operations, developers will reasonably assume they can emit them even after reload. But on LA64 we are expanding them using pseudos to reduce unneeded sign extensions, breaking such an expectation and causing ICE like PR 123320. Only create the pseudo when can_create_pseudo_p () to fix such cases. PR target/123320 gcc * config/loongarch/loongarch.md (<optab><mode>3): Only expand using psuedos when can_create_pseudo_p (). (addsi3): Likewise. gcc/testsuite * gcc.target/loongarch/la64/pr123320.c: New test.
