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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 22:43:27 PST 2020


craig.topper created this revision.
craig.topper added reviewers: t.p.northover, efriedma, spatel, RKSimon, dmgreen.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
craig.topper requested review of this revision.

Instead of trying to pattern match the code produced by ISD::ABS expansion, just custom legalize ISD::ABS to the desired sequence.

The one test change is because a DAG combine for (neg (abs)) is no longer firing because ISD::ABS is now Custom instead of Expand.


https://reviews.llvm.org/D92154

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/neg-abs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92154.307759.patch
Type: text/x-patch
Size: 4123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201126/ca1fd4c1/attachment.bin>


More information about the llvm-commits mailing list