[llvm] [InterleavedAccess] Construct interleaved access store with shuffles (PR #164000)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 08:18:55 PST 2025
ram-NK wrote:
```
// Getting all the interleaved operands.
while (ConcatLevel > 1) {
unsigned InterleavedOperands = Shuffles.size();
for (unsigned i = 0; i < InterleavedOperands; i++) {
ShuffleVectorInst *SFL = dyn_cast<ShuffleVectorInst>(Shuffles.front());
if (!SFL)
return false;
+ if (SVI != SFL && !SFL->isConcat())
+ return false;
Shuffles.pop_front();
Value *Op0 = SFL->getOperand(0);
Value *Op1 = SFL->getOperand(1);
Shuffles.push_back(dyn_cast<Value>(Op0));
Shuffles.push_back(dyn_cast<Value>(Op1));
}
ConcatLevel >>= 1;
}
```
isConcat() of ShuffleVectorInst will ensure the correctness of this interleaving logic. I tested with two cases. Works fine for me.
https://github.com/llvm/llvm-project/pull/164000
More information about the llvm-commits
mailing list