[mlir] Added support for Index type inside getZeroAttr function

Differential Revision: https://reviews.llvm.org/D85833
This commit is contained in:
Jakub Lichman
2020-08-12 13:07:28 +00:00
parent fc915d13b8
commit 9dd7ed24bf

View File

@@ -274,6 +274,8 @@ Attribute Builder::getZeroAttr(Type type) {
case StandardTypes::F32:
case StandardTypes::F64:
return getFloatAttr(type, 0.0);
case StandardTypes::Index:
return getIndexAttr(0);
case StandardTypes::Integer:
return getIntegerAttr(type, APInt(type.cast<IntegerType>().getWidth(), 0));
case StandardTypes::Vector: