[llvm] [LLVM] Add `Type::getTruncatedType()` and use it in Intrinsics.cpp (PR #196239)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 00:55:54 PDT 2026
================
@@ -70,6 +70,14 @@ class IntegerType : public Type {
return Type::getIntNTy(getContext(), 2 * getScalarSizeInBits());
}
+ /// Returns type half as wide the input type.
+ IntegerType *getTruncatedType() const {
+ unsigned BitWidth = getScalarSizeInBits();
----------------
nikic wrote:
```suggestion
unsigned BitWidth = getBitWidth();
```
https://github.com/llvm/llvm-project/pull/196239
More information about the llvm-commits
mailing list