[PATCH] D117210: [CodeGen] Support folds of not(cmp(cc, ...)) -> cmp(!cc, ...) for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 04:11:05 PST 2022


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, frasercrmck, peterwaller-arm, spatel.
Herald added subscribers: luke957, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

I have updated TargetLowering::isConstTrueVal to also consider
SPLAT_VECTOR nodes with constant integer operands. This allows the
optimisation to also work for targets that support scalable vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117210

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AArch64/sve-cmp-folds.ll
  llvm/test/CodeGen/RISCV/rvv/cmp-folds.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117210.399631.patch
Type: text/x-patch
Size: 6724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220113/c55c68ce/attachment.bin>


More information about the llvm-commits mailing list