[all-commits] [llvm/llvm-project] a3eb13: [X86] remove unnecessary movs when %rdx is an inpu...
Takashi Idobe via All-commits
all-commits at lists.llvm.org
Wed Mar 4 07:19:38 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a3eb13b5bfd1f216afcc128f9452bbb72daba0d6
https://github.com/llvm/llvm-project/commit/a3eb13b5bfd1f216afcc128f9452bbb72daba0d6
Author: Takashi Idobe <idobetakashi at gmail.com>
Date: 2026-03-04 (Wed, 04 Mar 2026)
Changed paths:
M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
A llvm/test/CodeGen/X86/mulx64-no-implicit-copy.ll
Log Message:
-----------
[X86] remove unnecessary movs when %rdx is an input to mulx (#184462)
Closes: https://github.com/llvm/llvm-project/issues/174912
When generating a `mulx` instruction for a widening multiplication, even
if one input is placed in %rdx, LLVM won't place it in the implicit
first slot, instead it'll generate two movs before calling mulx to swap
the registers, which are unnecessary. GCC already has this optimization
(as shown in the issue) so this puts the two compilers closer to each
other on that front.
Co-authored-by: Aiden Grossman <aidengrossman at google.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list