On Wed, Jun 24, 2026 at 8:07 AM H.J. Lu <[email protected]> wrote: > > Use the previous scratch register if it is a general purpose register > wide enough to supply the required mode, or an SSE register which > is valid in the required mode. If the required mode is QImode, the > previous scratch register must be valid in QImode. Also match const0_rtx > against CONST0_RTX. > > gcc/ > > PR target/125958 > * config/i386/i386-expand.cc (ix86_expand_lcp_stall_peephole): > Update previous scratch register check. Match const0_rtx > against CONST0_RTX. > > gcc/testsuite/ > > PR target/125958 > * gcc.target/i386/pr125958a.c: New test. > * gcc.target/i386/pr125958b.c: Likewise.
- /* Reject DEST if a register is not wide enough to - supply MODE or invalid for QImode. */ - if (!REG_P (dest) - || (GET_MODE_SIZE (GET_MODE (dest)) - < GET_MODE_SIZE (mode)) - || (mode == QImode - && !ANY_QI_REGNO_P (REGNO (dest)))) + /* Reject DEST if it isn't a general purpose register + wide enough to supply MODE or invalid for QImode + or isn't an SSE register which is invalid for + MODE. */ + if ((!GENERAL_REG_P (dest) Just change !REG_P (dest) to !GENERAL_REG_P (dest) and don't bother with SSE regs. Uros.
