[Mlir-commits] [mlir] [mlir][LLVM] Add nsw and nuw flags (PR #74508)

Ivan Butygin llvmlistbot at llvm.org
Wed Dec 6 05:12:03 PST 2023


================
@@ -69,7 +69,12 @@ static ParseResult parseLLVMOpAttrs(OpAsmParser &parser,
 
 static void printLLVMOpAttrs(OpAsmPrinter &printer, Operation *op,
                              DictionaryAttr attrs) {
-  printer.printOptionalAttrDict(processFMFAttr(attrs.getValue()));
+  if (auto iface = dyn_cast<IntegerOverflowFlagsInterface>(op))
+    printer.printOptionalAttrDict(
+        processFMFAttr(attrs.getValue()),
----------------
Hardcode84 wrote:

`processFMFAttr` probably should also be replaced by `elidedAttrs`, but for now, can you move it outside the `if`
```
SmallVector<NamedAttribute> processedAttrs = processFMFAttr(attrs.getValue());

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


More information about the Mlir-commits mailing list