*movstrict<mode>_1 insn pattern allows only general registers, so we have to reject modes not suitable for general regs in corresponding movstrict<mode> expander.
2020-03-02 Uroš Bizjak <ubiz...@gmail.com> PR target/93997 * config/i386/i386.md (movstrict<mode>): Allow only registers with VALID_INT_MODE_P modes. testsuite/ChangeLog: 2020-03-02 Uroš Bizjak <ubiz...@gmail.com> PR target/93997 * gcc.target/i386/pr93997.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6c57500ae8ec..8e29dffafa6e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2778,7 +2778,7 @@ { gcc_assert (SUBREG_P (operands[0])); if ((TARGET_PARTIAL_REG_STALL && optimize_function_for_speed_p (cfun)) - || GET_MODE_CLASS (GET_MODE (SUBREG_REG (operands[0]))) != MODE_INT) + || !VALID_INT_MODE_P (GET_MODE (SUBREG_REG (operands[0])))) FAIL; })