[all-commits] [llvm/llvm-project] e30a4f: [TargetLowering] Improve one signature of forceExp...
Craig Topper via All-commits
all-commits at lists.llvm.org
Thu Jan 23 12:49:57 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193
https://github.com/llvm/llvm-project/commit/e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193
Author: Craig Topper <craig.topper at sifive.com>
Date: 2025-01-23 (Thu, 23 Jan 2025)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/test/CodeGen/AArch64/i128-math.ll
M llvm/test/CodeGen/AArch64/umulo-128-legalisation-lowering.ll
M llvm/test/CodeGen/LoongArch/smul-with-overflow.ll
M llvm/test/CodeGen/RISCV/xaluo.ll
M llvm/test/CodeGen/SPARC/smulo-128-legalisation-lowering.ll
M llvm/test/CodeGen/Thumb/smul_fix.ll
M llvm/test/CodeGen/Thumb/smul_fix_sat.ll
M llvm/test/CodeGen/Thumb/umul_fix.ll
M llvm/test/CodeGen/Thumb/umul_fix_sat.ll
M llvm/test/CodeGen/X86/muloti.ll
M llvm/test/CodeGen/X86/smul-with-overflow.ll
M llvm/test/CodeGen/X86/smul_fix_sat.ll
M llvm/test/CodeGen/X86/smulo-128-legalisation-lowering.ll
M llvm/test/CodeGen/X86/vec_smulo.ll
M llvm/test/CodeGen/X86/xmulo.ll
Log Message:
-----------
[TargetLowering] Improve one signature of forceExpandWideMUL. (#123991)
We have two forceExpandWideMUL functions. One takes the low and high
half of 2 inputs and calculates the low and high half of their product.
This does not calculate the full 2x width product.
The other signature takes 2 inputs and calculates the low and high half
of their full 2x width product. Previously it did this by sign/zero
extending the inputs to create the high bits and then calling the other
function.
We can instead copy the algorithm from the other function and use the
Signed flag to determine whether we should do SRA or SRL. This avoids
the need to multiply the high part of the inputs and add them to the
high half of the result. This improves the generated code for signed
multiplication.
This should improve the performance of #123262. I don't know yet how
close we will get to gcc.
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