[llvm] [NVPTX] Propagate truncate to operands (PR #98666)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 14:02:26 PDT 2024
Artem-B wrote:
> Your 128-bit mul could become a 32-bit mul after the combine.
Mul is the odd one out on the list as it nominally has different number of valid bits in the operands and the result.
If the target has widening mul (NVPTX does), then the operands could be indeed truncated to half of the result size.
I think the optimization for mul could be improved by checking if UMUL_LOHI is legal and using that with operands truncated to half the size. That's somewhat orthogonal to a simpler choice whether it's beneficial to use an additional truncate but save on the number of registers used. Let's gat this part sorted out first.
https://github.com/llvm/llvm-project/pull/98666
More information about the llvm-commits
mailing list