[PATCH] D118147: [AArch64][SVE] Folds VSELECT if the predicate is all active.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 07:46:36 PST 2022


sdesmalen created this revision.
sdesmalen added reviewers: david-arm, DavidTruby, bsmith.
Herald added subscribers: 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.

This adds the following changes:

- Fold: vselect(<all active predicate>, x, y) => x
- Extend isAllActivePredicate to take vscale_range into account, e.g. isAllActivePredicate(vl16) for nxv16i1 and vscale == 1 => true. isAllActivePredicate(vl32) for nxv16i1 and vscale == 2 => true.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118147

Files:
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/test/CodeGen/AArch64/sve-vselect-fold.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118147.402913.patch
Type: text/x-patch
Size: 4772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/1615cae2/attachment.bin>


More information about the llvm-commits mailing list