[Mlir-commits] [mlir] 6ac9ab8 - [mlir][arith] Fix variable only used by assert (#188461)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Mar 25 04:48:10 PDT 2026


Author: Yi Zhang
Date: 2026-03-25T07:48:04-04:00
New Revision: 6ac9ab87dac313f561432c1271c4083b5f09df94

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

LOG: [mlir][arith] Fix variable only used by assert (#188461)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp b/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
index a0346ec6f4fb6..64ed672878f7b 100644
--- a/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
+++ b/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
@@ -279,8 +279,8 @@ struct ConvertFOpLowering : public ConvertOpToLLVMPattern<arith::ConvertFOp> {
 
     // Only bf16 <-> f16 conversions are supported. There is currently no other
     // pair of FP types that are valid LLVM types.
-    auto srcType = getElementTypeOrSelf(op.getIn().getType());
-    auto dstType = getElementTypeOrSelf(op.getType());
+    [[maybe_unused]] auto srcType = getElementTypeOrSelf(op.getIn().getType());
+    [[maybe_unused]] auto dstType = getElementTypeOrSelf(op.getType());
     assert((srcType.isBF16() && dstType.isF16()) ||
            (srcType.isF16() && dstType.isBF16()) &&
                "only bf16 <-> f16 conversions are supported");


        


More information about the Mlir-commits mailing list