[llvm] [AArch64][MachineCombiner] Reassociate long chains of accumulation instructions into a tree to increase ILP (PR #126060)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 9 07:18:40 PST 2025
https://github.com/davemgreen commented:
UABAL is a more unusual choice to pick as the first instruction. Did you try other operations like MLA, that are likely more common and I believe still perform the same accumulation? The idea sounds like a nice one, but adding extra instructions does sometimes make transforms like this less reliable than if we were purely reassociating.
Could the main part of the logic be added to base MachineCombiner, like the existing code that uses isAssociativeAndCommutative?
It is probably worth making sure there are tests for all the types, preferably with tests at the .ll level so we can see the whole output. Things like different chain lengths too, maybe, and signed/unsigned, loops and the "2" variants of the instructions.
https://github.com/llvm/llvm-project/pull/126060
More information about the llvm-commits
mailing list