[Mlir-commits] [mlir] [MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (PR #188741)
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 13 04:00:12 PDT 2026
================
@@ -311,6 +311,13 @@ convertModuleFlagValue(StringRef key, ArrayAttr arrayAttr,
}
return llvm::MDTuple::getDistinct(context, nodes);
}
+ // Handle ArrayAttr of StringAttrs (e.g. "riscv-isa") by converting back to
+ // an MDTuple of MDStrings for a lossless round-trip.
+ if (llvm::all_of(arrayAttr, [](Attribute a) { return isa<StringAttr>(a); })) {
----------------
joker-eph wrote:
Added check in the verifier, and an assert here.
https://github.com/llvm/llvm-project/pull/188741
More information about the Mlir-commits
mailing list