Use direct passing for 32- and 64-bit unsigned integers. (#5980)

Previously we only avoided creating a thunk for signed integers. But the
same logic also applies to the unsigned 32-bit and 64-bit types.
This commit is contained in:
Richard Smith
2025-08-25 21:49:03 +00:00
committed by GitHub
parent 74016d47f9
commit ddafbc9331
4 changed files with 162 additions and 123 deletions
+3 -3
View File
@@ -53,12 +53,12 @@ static auto IsThunkRequiredForType(Context& context, SemIR::TypeId type_id)
return true;
}
if (!context.types().IsSignedInt(type_id)) {
auto int_info = context.types().TryGetIntTypeInfo(type_id);
if (!int_info || !int_info->bit_width.has_value()) {
return true;
}
llvm::APInt bit_width =
context.ints().Get(context.types().GetIntTypeInfo(type_id).bit_width);
llvm::APInt bit_width = context.ints().Get(int_info->bit_width);
return bit_width != 32 && bit_width != 64;
}