[PATCH] D141665: [DAGCombine][AArch64][ARM] Combine abd(sub(x, y)) to abd if the sub is nsw
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 02:10:47 PST 2023
dmgreen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:10120
+ TLI.isOperationLegalOrCustom(ISD::ABDS, VT))
+ return DAG.getNode(ISD::ABDS, SDLoc(N), VT, Op0, Op1);
return SDValue();
----------------
RKSimon wrote:
> You can probably hoist this before the sext/zext test?
The idea is that if we have a sext/zext pair then is better to use them in the abd, creating the smaller type. We use the wrapping flags if that fails.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141665/new/
https://reviews.llvm.org/D141665
More information about the llvm-commits
mailing list