[Mlir-commits] [mlir] [mlir][Vector] Add constant folding for vector.from_elements operation (PR #145849)
Diego Caballero
llvmlistbot at llvm.org
Thu Jun 26 10:25:01 PDT 2025
================
@@ -398,6 +398,19 @@ std::optional<int64_t> vector::getConstantVscaleMultiplier(Value value) {
return {};
}
+/// Converts an IntegerAttr to have the specified type if needed.
+/// This handles cases where constant attributes (e.g., from
+/// `llvm.mlir.constant`) have a different type than the target element type. If
+/// the input attribute is not an IntegerAttr or already has the correct type,
----------------
dcaballe wrote:
This sounds good but I wouldn't add a reference to `llvm.mlir.constant` here as supporting LLVM ops shouldn't be a requirement here.
https://github.com/llvm/llvm-project/pull/145849
More information about the Mlir-commits
mailing list