diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h --- a/mlir/include/mlir/IR/Builders.h +++ b/mlir/include/mlir/IR/Builders.h @@ -69,7 +69,10 @@ IndexType getIndexType(); IntegerType getI1Type(); + IntegerType getI2Type(); + IntegerType getI4Type(); IntegerType getI8Type(); + IntegerType getI16Type(); IntegerType getI32Type(); IntegerType getI64Type(); IntegerType getIntegerType(unsigned width); 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 @@ -49,8 +49,14 @@ IntegerType Builder::getI1Type() { return IntegerType::get(context, 1); } +IntegerType Builder::getI2Type() { return IntegerType::get(context, 2); } + +IntegerType Builder::getI4Type() { return IntegerType::get(context, 4); } + IntegerType Builder::getI8Type() { return IntegerType::get(context, 8); } +IntegerType Builder::getI16Type() { return IntegerType::get(context, 16); } + IntegerType Builder::getI32Type() { return IntegerType::get(context, 32); } IntegerType Builder::getI64Type() { return IntegerType::get(context, 64); }