[llvm] [NVPTX][SelectionDAG] Add IMAD combine rules + infra to disable default SelectionDAG rules for testing (PR #121724)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 5 20:03:30 PST 2025
peterbell10 wrote:
> This would be better without a stronger justification for why an intermediate node is useful
Perhaps the NVPTX maintainers know the history better here.
> Should have a more concrete justification. Generally combines that would break the pattern are new instances of the pattern to handle (e.g. multiply-to-shift + add)
That's a very relevant example. multiply-to-shift is a pessimisation if it breaks up a mad, since `mad.lo` [has the same throughput as shift](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#arithmetic-instructions), but is able to fuse the additional add in the same instruction.
https://github.com/llvm/llvm-project/pull/121724
More information about the llvm-commits
mailing list