https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
This is a latent bug in the sched1 pass. This change
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index effab299349..c532f0596c7 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -10517,7 +10517,7 @@ (define_insn "*mul<mode>3_1<nf_name>"
[(set (match_operand:SWIM248 0 "register_operand" "=r,r,r,r")
(mult:SWIM248
(match_operand:SWIM248 1 "nonimmediate_operand" "%rm,rm,0,r")
- (match_operand:SWIM248 2 "<general_operand>" "K,<i>,<m>r,<m>r")))]
+ (match_operand:SWIM248 2 "<general_operand>" "K,<i>,mr,mr")))]
"!(MEM_P (operands[1]) && MEM_P (operands[2]))
&& <nf_condition>"
"@
hides the bug.