[Mlir-commits] [mlir] [MLIR][Transforms] add eliminate-explicit-rounding pass (PR #93443)
Ivy Zhang
llvmlistbot at llvm.org
Thu Jun 6 19:01:55 PDT 2024
================
@@ -98,6 +99,15 @@ class VectorConvertToLLVMPattern : public ConvertOpToLLVMPattern<SourceOp> {
static_assert(
std::is_base_of<OpTrait::OneResult<SourceOp>, SourceOp>::value,
"expected single result op");
+
+ // Check if the operation is remove the fastMathAttr on ExtFOp / TruncFOp.
+ if (isa<arith::ExtFOp>(op.getOperation()) ||
+ isa<arith::TruncFOp>(op.getOperation())) {
+ if (op->hasAttr("fastmath")) {
+ op->removeAttr("fastmath");
+ }
+ }
+
----------------
crazydemo wrote:
Is it OK to passdown the extf / truncf fastmathflag `contract` to llvm. Do we need such a remove attr logic here? @krzysz00 @kuhar
https://github.com/llvm/llvm-project/pull/93443
More information about the Mlir-commits
mailing list