[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 22:07:03 PDT 2026
================
@@ -67,7 +67,15 @@ class IntegerType : public Type {
/// Returns type twice as wide the input type.
IntegerType *getExtendedType() const {
- return Type::getIntNTy(getContext(), 2 * getScalarSizeInBits());
+ return Type::getIntNTy(getContext(), 2 * getBitWidth());
+ }
+
+ /// Returns type half as wide the input type.
+ IntegerType *getTruncatedType() const {
----------------
jurahul wrote:
The rename touches a few more files since the vector ones are used more. Let me merge this and start another PR to rename both.
https://github.com/llvm/llvm-project/pull/196239
More information about the llvm-commits
mailing list