diff --git a/mlir/lib/IR/Builders.cpp b/mlir/lib/IR/Builders.cpp --- a/mlir/lib/IR/Builders.cpp +++ b/mlir/lib/IR/Builders.cpp @@ -274,6 +274,8 @@ 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().getWidth(), 0)); case StandardTypes::Vector: