[Mlir-commits] [mlir] [MLIR][Arith] Add denormal attribute to binary/unary operations (PR #112700)

Jakub Kuderski llvmlistbot at llvm.org
Thu Nov 21 13:04:33 PST 2024


================
@@ -1501,12 +1501,17 @@ void printShortForm(OpAsmPrinter &p, Operation *payloadOp) {
   std::string attrToElide;
   p << " { " << payloadOp->getName().getStringRef();
   for (const auto &attr : payloadOp->getAttrs()) {
-    auto fastAttr =
-        llvm::dyn_cast<mlir::arith::FastMathFlagsAttr>(attr.getValue());
-    if (fastAttr && fastAttr.getValue() == mlir::arith::FastMathFlags::none) {
-      attrToElide = attr.getName().str();
-      elidedAttrs.push_back(attrToElide);
-      break;
+    if (auto fastAttr =
+            llvm::dyn_cast<arith::FastMathFlagsAttr>(attr.getValue())) {
+      if (fastAttr.getValue() == arith::FastMathFlags::none) {
+        elidedAttrs.push_back(attr.getName().str());
+      }
+    }
+    if (auto denormAttr =
+            llvm::dyn_cast<arith::DenormalModeAttr>(attr.getValue())) {
----------------
kuhar wrote:

nit: we shouldn't have to prefix cast with `llvm::`

https://github.com/llvm/llvm-project/pull/112700


More information about the Mlir-commits mailing list