[llvm] [X86] remove unnecessary movs when %rdx is an input to mulx (PR #184462)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 23:08:40 PST 2026
topperc wrote:
> > > I was thinking we'd better do it in a general way. But took a look at instructions, seems MULX is the only one that can commute operands with implicit register. So LGTM.
> >
> >
> > Doesn't the MUL/IMUL that produces a full product have the same issue? It multiplies AL/AX/EAX/RAX by another register or memory.
>
> The 2addr pass handles it: https://godbolt.org/z/acrs67ffG. MULX is not a tranditional 2addr instruction.
That's not the instruction was I was referring to. I'm referring to the MUL that produces EDX:EAX or RDX:RAX result.
https://github.com/llvm/llvm-project/pull/184462
More information about the llvm-commits
mailing list