[Mlir-commits] [mlir] [mlir][arith] Fix variable only used by assert (PR #188461)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 25 04:25:28 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Yi Zhang (cathyzhyi)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/188461.diff
1 Files Affected:
- (modified) mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp (+3-2)
``````````diff
diff --git a/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp b/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
index a0346ec6f4fb6..d9ab2cd5cabe7 100644
--- a/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
+++ b/mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
@@ -279,11 +279,12 @@ 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");
+ llvm::
Type convertedType = getTypeConverter()->convertType(op.getType());
if (!convertedType)
``````````
</details>
https://github.com/llvm/llvm-project/pull/188461
More information about the Mlir-commits
mailing list