[PATCH] D136832: [VectorUtils] Add getShuffleDemandedElts helper
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 06:11:22 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Analysis/VectorUtils.cpp:432-434
+bool llvm::getShuffleDemandedElts(int SrcWidth, ArrayRef<int> Mask,
+ const APInt &DemandedElts, APInt &DemandedLHS,
+ APInt &DemandedRHS, bool AllowUndefElts) {
----------------
spatel wrote:
> Can we assert that SrcWidth == DemandedLHS.getBitWidth() == DemandedRHS.getBitWidth() ?
Many of the the use cases we have we could technically get away with them being entirely uninitialized upon calling getShuffleDemandedElts - (a couple still initialize before calling getShuffleDemandedElts but its unnecessary). Which do you think is better? TBH I have no preference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136832/new/
https://reviews.llvm.org/D136832
More information about the llvm-commits
mailing list