[PATCH] D92154: [AArch64] Add custom lowering for ISD::ABS
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 26 12:04:59 PST 2020
craig.topper added a comment.
I am considering adding NABS. My original thought was that the DAG combine for NABS was unnecessary on some targets if we expanded to srai+xor+sub instead of srai+add+xor. The the neg and the sub would be free to combine on their own. Of course that doesnt work for targets with custom sequences but the custom sequences probably have better NABS forms anyway. Like csneg with an inverse condition. Or smin(neg)) on other targets. This is where a NABS node could be useful.
Aarch64 is matching the srai+add+xor sequence so it broke when I tried changing it. It looks like this combine predates the existence of ISD::ABS. Using Custom lowering seems like a more standard way to handle it now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92154/new/
https://reviews.llvm.org/D92154
More information about the llvm-commits
mailing list