[Mlir-commits] [mlir] b0bbc9b - [mlir][NVGPU] Fix -Wunsequenced warning

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Nov 8 12:47:53 PST 2022


Author: rkayaith
Date: 2022-11-08T15:47:12-05:00
New Revision: b0bbc9b5951efaba6220c654c825050392627cbb

URL: https://github.com/llvm/llvm-project/commit/b0bbc9b5951efaba6220c654c825050392627cbb
DIFF: https://github.com/llvm/llvm-project/commit/b0bbc9b5951efaba6220c654c825050392627cbb.diff

LOG: [mlir][NVGPU] Fix -Wunsequenced warning

llvm-project/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp:441:25:
warning: multiple unsequenced modifications to 'asmArgIdx'
[-Wunsequenced]
  ss << "$" << asmArgIdx++ << ",$" << asmArgIdx++ << ";";
                        ^                      ~~

Added: 
    

Modified: 
    mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
index d9f54b8cb55d7..415b87559a6e2 100644
--- a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
+++ b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
@@ -438,7 +438,8 @@ buildMmaSparseAsmString(const std::array<int64_t, 3> &shape, unsigned matASize,
       ss << "$" << asmArgIdx++ << (i < arrSize - 1 ? "," : "");
     ss << "},";
   }
-  ss << "$" << asmArgIdx++ << ",$" << asmArgIdx++ << ";";
+  ss << "$" << asmArgIdx++ << ",";
+  ss << "$" << asmArgIdx++ << ";";
   ss.flush();
   return asmStr;
 }


        


More information about the Mlir-commits mailing list