[PATCH] D129150: [DAG] Canonicalize non-inlane shuffle -> AND if all non-inlane referenced elements are known zero
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 16 03:17:42 PDT 2022
dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11814
+bool AArch64TargetLowering::isVectorClearMaskLegal(ArrayRef<int> M,
+ EVT VT) const {
----------------
RKSimon wrote:
> dmgreen wrote:
> > Is this saying that `MOV #0 + LegalShuffle` is always better than `create mask + and`? I think that sounds OK, so long as it doesn't destroy any BIC patterns.
> There's nothing enforcing it, but M should always be a 'select/blend' style mask (+ undefs) - afaict it will only ever match in isShuffleMaskLegal against 2-element zip style patterns? I think those were the regressions I saw.
Yeah I think this sounds OK to enable, from what I can see. The testcase it changes is a little odd as it has quite a few undefs, but in general I've not seen any issues from it from experimenting.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129150/new/
https://reviews.llvm.org/D129150
More information about the llvm-commits
mailing list