[llvm] [AArch64] Transform add(x, abs(y)) -> saba(x, y, 0) (PR #156615)
Hari Limaye via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 02:12:53 PDT 2025
hazzlim wrote:
> Nice, I'm surprised this is the first use of SDPatternMatch.
I was suprised too, but it does seem to be (llvm::PatternMatch is used, but not llvm::SDPatternMatch).
> Do we need the new combine / node, or could this be done with a tablegen pattern directly?
I was thinking that this couldn't be done via tablegen, because in order to transform `add(x, abs(y)) -> saba(x, y, 0)` we need to create a new operand (the zeros vector), which I wasn't sure is possible to do via a tablegen pattern. But maybe I'm wrong there?
https://github.com/llvm/llvm-project/pull/156615
More information about the llvm-commits
mailing list