[llvm] [NVPTX] Lower LLVM masked vector loads and stores to PTX (PR #159387)
Drew Kersnar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 12:15:55 PDT 2025
================
@@ -3214,16 +3213,14 @@ convertMLOADToLoadWithUsedBytesMask(MemSDNode *N, SelectionDAG &DAG) {
uint32_t ElementSizeInBytes = ElementSizeInBits / 8;
uint32_t ElementMask = (1u << ElementSizeInBytes) - 1u;
- for (unsigned I :
- llvm::reverse(llvm::seq<unsigned>(0, ResVT.getVectorNumElements()))) {
- assert(isa<ConstantSDNode>(Mask.getOperand(I)) &&
- "Mask elements must be constants");
- // We technically only want to do this shift for every iteration *but* the
- // first, but in the first iteration NewMask is 0, so this shift is a
- // no-op.
+ for (SDValue Op : llvm::reverse(Mask->ops())) {
----------------
dakersnar wrote:
Done.
https://github.com/llvm/llvm-project/pull/159387
More information about the llvm-commits
mailing list