[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:03:00 PDT 2025


================
@@ -2918,10 +2918,9 @@ static SDValue lowerMSTORE(SDValue Op, SelectionDAG &DAG) {
   assert(Mask.getValueType().getVectorNumElements() ==
              ValVT.getVectorNumElements() &&
          "Mask size must be the same as the vector size");
-  for (unsigned I : llvm::seq(ValVT.getVectorNumElements())) {
-    assert(isa<ConstantSDNode>(Mask.getOperand(I)) &&
-           "Mask elements must be constants");
-    if (Mask->getConstantOperandVal(I) == 0) {
+  for (auto [I, Op] : enumerate(Mask->ops())) {
+    // Mask elements must be constants.
+    if (Op.getNode()->getAsZExtVal() == 0) {
----------------
dakersnar wrote:

`auto` defaults to SDUse, so we need this call.

https://github.com/llvm/llvm-project/pull/159387


More information about the llvm-commits mailing list