[llvm] [LLVM] Add `Type::getTruncatedType()` and use it in Intrinsics.cpp (PR #196239)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 09:16:59 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();
----------------
jurahul wrote:
Done.
https://github.com/llvm/llvm-project/pull/196239
More information about the llvm-commits
mailing list