Consider using pair mode to return scalar pair bools as i1 #52198
Labels
A-codegen
Area: Code generation
A-cranelift
Things relevant to the [future] cranelift backend
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Starting in #51583, we're representing scalar pair
bool
s asi8
in LLVM aggregates to match their memory storage, whereas they arei1
as immediate values.When a pair is the argument to a function, we use
PassMode::Pair
and pass each part like independent immediate values. We don't use that mode for return values though, so a pairedbool
will be extended toi8
for return, then truncated back toi1
when the caller unpacks it.Quoting @eddyb in #51583 (comment):
The text was updated successfully, but these errors were encountered: