[PATCH] D118327: [AArch64] Genereate CCMP from And CSel

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 00:32:25 PST 2022


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, samtebbs, jaykang10, fhahn, labrinea.
Herald added subscribers: hiraditya, kristof.beyls.
dmgreen requested review of this revision.
Herald added a project: LLVM.

LLVM has a couple of ways of producing ccmp - either from chains in isel or from a later ifcvt style pass. This adds a simple DAG combine to capture more cases, converting `and(csel(0, 1, cc0), csel(0, 1, cc1))` into a `csel(ccmp(.., cc0))`, depending on cc1 (a SUBS in this case).


https://reviews.llvm.org/D118327

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/andcompare.ll
  llvm/test/CodeGen/AArch64/arm64-ccmp.ll
  llvm/test/CodeGen/AArch64/select-with-and-or.ll
  llvm/test/CodeGen/AArch64/umulo-128-legalisation-lowering.ll
  llvm/test/CodeGen/AArch64/vec_umulo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118327.403525.patch
Type: text/x-patch
Size: 45440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/65a1e30e/attachment.bin>


More information about the llvm-commits mailing list