Skip to content

Commit 267be4a

Browse files
committed
[MLIR] Reference issue for implicit trunc TODOs (NFC)
1 parent 255a99c commit 267be4a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mlir/include/mlir/IR/BuiltinAttributes.td

+1
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ def Builtin_IntegerAttr : Builtin_Attr<"Integer", "integer",
702702
}
703703

704704
// TODO: Avoid implicit trunc?
705+
// See https://github.com/llvm/llvm-project/issues/112510.
705706
IntegerType intTy = ::llvm::cast<IntegerType>(type);
706707
APInt apValue(intTy.getWidth(), value, intTy.isSignedInteger(),
707708
/*implicitTrunc=*/true);

mlir/lib/IR/Builders.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ IntegerAttr Builder::getIntegerAttr(Type type, int64_t value) {
269269
if (type.isIndex())
270270
return IntegerAttr::get(type, APInt(64, value));
271271
// TODO: Avoid implicit trunc?
272+
// See https://github.com/llvm/llvm-project/issues/112510.
272273
return IntegerAttr::get(type, APInt(type.getIntOrFloatBitWidth(), value,
273274
type.isSignedInteger(),
274275
/*implicitTrunc=*/true));

0 commit comments

Comments
 (0)