[Mlir-commits] [mlir] 042468b - [mlir][SME] Fix unused variable	warning
    Goran Flegar 
    llvmlistbot at llvm.org
       
    Thu Sep 28 06:24:32 PDT 2023
    
    
  
Author: Goran Flegar
Date: 2023-09-28T15:24:27+02:00
New Revision: 042468bff5ae4d2da3fed6cfd2fb92de0c7081e5
URL: https://github.com/llvm/llvm-project/commit/042468bff5ae4d2da3fed6cfd2fb92de0c7081e5
DIFF: https://github.com/llvm/llvm-project/commit/042468bff5ae4d2da3fed6cfd2fb92de0c7081e5.diff
LOG: [mlir][SME] Fix unused variable warning
Added: 
    
Modified: 
    mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp
Removed: 
    
################################################################################
diff  --git a/mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp b/mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp
index 20c9fb6621eb610..46527d38b9bd456 100644
--- a/mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp
+++ b/mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp
@@ -332,6 +332,8 @@ struct SplatOpToArmSMELowering : public OpRewritePattern<vector::SplatOp> {
     auto tileElementType = tileType.getElementType();
 
     assert(srcType.isIntOrFloat() && "Invalid source type for vector.splat");
+    // Avoid unused-variable warning when building without assertions.
+    (void)srcType;
 
     // First, broadcast the scalar to a 1-d vector.
     VectorType tileSliceType = VectorType::Builder(tileType).dropDim(0);
        
    
    
More information about the Mlir-commits
mailing list