[llvm] [RISCV] Fix matching bug in VLA shuffle lowering (PR #134750)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 8 03:49:05 PDT 2025
================
@@ -5399,16 +5399,16 @@ static SDValue lowerDisjointIndicesShuffle(ShuffleVectorSDNode *SVN,
/// Is this mask local (i.e. elements only move within their local span), and
/// repeating (that is, the same rearrangement is being done within each span)?
static bool isLocalRepeatingShuffle(ArrayRef<int> Mask, int Span) {
- SmallVector<int> LowSpan(Span, -1);
+ // Require a prefix from the original mask until the consumer code
+ // is adjusted to rewrite the mask instead of just taking a prefix.
+ SmallVector<int> LowSpan(Mask.take_front(Span));
----------------
lukel97 wrote:
Nit, I think this can now be
```suggestion
ArrayRef<int> LowSpan = Mask.take_front(Span);
```
https://github.com/llvm/llvm-project/pull/134750
More information about the llvm-commits
mailing list