[PATCH] D90126: [AArch64] Remove AArch64ISD::NOT, use vnot instead

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 25 14:37:22 PDT 2020


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

`vnot` (`xor -1`) should be equivalent to the AArch64 specific AArch64ISD::NOT node, but allow more folding thanks to all the target independent optimizations. Specifically this allows `select(icmp ne, x, y)` to become `cmeq; bsl y, x` as opposed to needing to convert the predicate with `cmeq; mvn; bsl x, y`

Unfortunately there is a regression in a cmtst test, but the code it selected from was already non-canonical, with instcombine preferring to use an eq predicate instead. Plus the more common case of icmp ne is improved.


https://reviews.llvm.org/D90126

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/neon-bitwise-instructions.ll
  llvm/test/CodeGen/AArch64/srem-seteq-vec-nonsplat.ll
  llvm/test/CodeGen/AArch64/urem-seteq-vec-nonsplat.ll
  llvm/test/CodeGen/AArch64/vec_umulo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90126.300556.patch
Type: text/x-patch
Size: 9535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201025/e7a749a4/attachment.bin>


More information about the llvm-commits mailing list