[Mlir-commits] [mlir] [mlir][arith] Add nneg to extui and uitofp. (PR #183165)

Erick Ochoa Lopez llvmlistbot at llvm.org
Wed Feb 25 08:33:19 PST 2026


================
@@ -111,6 +111,29 @@ class AttrConvertOverflowToLLVM {
   DictionaryAttr propertiesAttr;
 };
 
+// Attribute converter that populates a NamedAttrList by removing the nonNeg
+// attribute from the source operation attributes, and setting it as a property
+// on the target LLVM operation.
+template <typename SourceOp, typename TargetOp>
+class AttrConvertNonNegToLLVM {
+public:
+  AttrConvertNonNegToLLVM(SourceOp srcOp) {
+    convertedAttr = NamedAttrList{srcOp->getAttrs()};
+    if (convertedAttr.erase("nonNeg")) {
----------------
amd-eochoalo wrote:

https://github.com/llvm/llvm-project/pull/183165/commits/5aaa1b42584c19322600edc245a564fe88f07292

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


More information about the Mlir-commits mailing list