diff options
author | Craig Topper <craig.topper@sifive.com> | 2025-01-23 12:49:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-23 12:49:35 -0800 |
commit | e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193 (patch) | |
tree | e7a3a28dbed1a835a3febc155ae169eadc5f1382 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | e19261faf5c771bd7951b987abe8de698469e9f1 (diff) | |
download | llvm-e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193.zip llvm-e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193.tar.gz llvm-e30a4fc3e20bf5d9cc2f5bfcb61b4eb0e686a193.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions