-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Consider using pair mode to return scalar pair bools as i1 #52198
Copy link
Copy link
Open
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Starting in #51583, we're representing scalar pair
bools asi8in LLVM aggregates to match their memory storage, whereas they arei1as immediate values.When a pair is the argument to a function, we use
PassMode::Pairand pass each part like independent immediate values. We don't use that mode for return values though, so a pairedboolwill be extended toi8for return, then truncated back toi1when the caller unpacks it.Quoting @eddyb in #51583 (comment):