[Mlir-commits] [mlir] [mlir][llvm] Use zeroinitializer for TargetExtType (PR #66510)
Lukas Sommer
llvmlistbot at llvm.org
Mon Sep 18 04:23:08 PDT 2023
================
@@ -2051,13 +2051,8 @@ LogicalResult GlobalOp::verify() {
<< "this target extension type cannot be used in a global";
if (Attribute value = getValueOrNull()) {
- // Only a single, zero integer attribute (=zeroinitializer) is allowed for
- // a global value with TargetExtType.
- // TODO: Replace with 'zeroinitializer' once there is a dedicated
- // zeroinitializer operation in the LLVM dialect.
- if (!isa<IntegerAttr>(value) || !isZeroAttribute(value))
- return emitOpError()
- << "expected zero value for global with target extension type";
+ return emitOpError() << "global with target extension type can only be "
+ "initialized with zero-initializer";
}
----------------
sommerlukas wrote:
Done.
https://github.com/llvm/llvm-project/pull/66510
More information about the Mlir-commits
mailing list