[llvm] [IA][RISCV] Add support for vp.load/vp.store with shufflevector (PR #135445)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 19:10:45 PDT 2025
================
@@ -644,13 +740,25 @@ static Value *getMask(Value *WideMask, unsigned Factor) {
}
}
- if (match(WideMask, m_AllOnes())) {
- // Scale the vector length of all-ones mask.
- ElementCount OrigEC =
- cast<VectorType>(WideMask->getType())->getElementCount();
- assert(OrigEC.getKnownMinValue() % Factor == 0);
- return ConstantVector::getSplat(OrigEC.divideCoefficientBy(Factor),
- cast<Constant>(WideMask)->getSplatValue());
+ if (auto *ConstMask = dyn_cast<Constant>(WideMask)) {
+ if (auto *Splat = ConstMask->getSplatValue()) {
+ // All-ones or all-zeros mask.
+ return ConstantVector::getSplat(LeafValueEC, Splat);
+ } else if (LeafValueEC.isFixed()) {
----------------
mshockwave wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/135445
More information about the llvm-commits
mailing list