https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101922
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>: https://gcc.gnu.org/g:f93f0868919ab32bfbc24adb40158298031a4d58 commit r12-3063-gf93f0868919ab32bfbc24adb40158298031a4d58 Author: Xi Ruoyao <xry...@mengyan1223.wang> Date: Fri Aug 20 22:52:57 2021 +0800 mips: msa: truncate immediate shift amount [PR101922] When -mloongson-mmi is enabled, SHIFT_COUNT_TRUNCATED is turned off. This causes untruncated immediate shift amount outputed into the asm, and the GNU assembler refuses to assemble it. Truncate immediate shift amount when outputing the asm instruction to make GAS happy again. gcc/ PR target/101922 * config/mips/mips-protos.h (mips_msa_output_shift_immediate): Declare. * config/mips/mips.c (mips_msa_output_shift_immediate): New function. * config/mips/mips-msa.md (vashl<mode>3, vashr<mode>3, vlshr<mode>3): Call it. gcc/testsuite/ PR target/101922 * gcc.target/mips/pr101922.c: New test.