mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:51:05 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user