[PATCH] D117574: [AArch64][SVE] POC: Use predicate registers for <N x i1> expression trees.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 09:30:46 PST 2022


sdesmalen created this revision.
Herald added subscribers: ctetreau, ecnelises, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
sdesmalen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

By default fixed-width i1 vectors are promoted, but when SVE is available,
some expression trees can be rewritten to use <vscale x M x i1> types,
such that all operations are performed on predicate registers, thus
avoiding unnecessary sign-extends and truncates.

The example chosen in this patch is to optimise an OR reduction
of a <N x i1> type, which can be implemented directly with a PTEST
instruction.

Note: this patch also contains a few other improvements that can be
split out into individual patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117574

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/sve-fixed-length-ptest.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117574.400879.patch
Type: text/x-patch
Size: 10793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/cfa51eb2/attachment.bin>


More information about the llvm-commits mailing list