Issue 244201
Summary [X86] Model hi-part of one-op MUL correctly
Labels backend:X86, backend:X86 Scheduler+Cost Models, optimization:AMDCPU
Assignees 222rohan
Reporter 222rohan
    Split from #243077 as this change applies to both AMD/Intel.

The scheduler model costs one-operand mul/imul 's high part latency the same as low part, though the numbers on uops.info (and confirming on Zen hardware) say otherwise. In most modern x86 processors, the cost varies like this, 
`lat : 3cy (lo), 4cy (hi)`. So the high-part is undercosted.

I believe MULX models this correctly with `WriteIMulH`. We could wire this into MUL as well.

Reported-by: @chfast 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to