[PATCH] D92154: [AArch64] Add custom lowering for ISD::ABS

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 28 14:26:47 PST 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3981
+                            Op.getOperand(0));
+  // Generate SUBS & CSEL.
+  SDValue Cmp =
----------------
dmgreen wrote:
> Can we just generate a SUBS (which becomes the CMP) and a CSNEG directly? That should avoid needing to create the two sub's I think.
Maybe. I wasn't clear why AArch64 has both AArch64ISD::CSNEG and isel patterns to form CSNEG from CSEL+neg.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92154/new/

https://reviews.llvm.org/D92154



More information about the llvm-commits mailing list