[PATCH] D99940: [ARM] Combine sub 0, csinc X, Y, CC -> csinv -X, Y, CC

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 03:42:47 PDT 2021


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, simon_tatham, ostannard, efriedma, malharJ.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Combine `sub 0, csinc X, Y, CC` to `csinv -X, Y, CC` providing that the negation of X is cheap, currently just handling constants.  This comes up during the splat of an i1 to a predicate, where we now generate `csetm`, as opposed to `cset; rsb`.


https://reviews.llvm.org/D99940

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/Thumb2/mve-masked-store.ll
  llvm/test/CodeGen/Thumb2/mve-pred-build-var.ll
  llvm/test/CodeGen/Thumb2/mve-vmovimm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99940.335456.patch
Type: text/x-patch
Size: 16956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210406/bb3bc523/attachment.bin>


More information about the llvm-commits mailing list