Skip to content

Make black_box a no-op #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Make black_box a no-op #363

wants to merge 3 commits into from

Conversation

LegNeato
Copy link
Collaborator

Part of #312

@LegNeato LegNeato force-pushed the blackbox branch 3 times, most recently from d689ea2 to 729aacb Compare August 14, 2025 05:58
@LegNeato LegNeato enabled auto-merge August 14, 2025 13:47
@nazar-pc nazar-pc mentioned this pull request Aug 15, 2025
// Preserve both elements by spilling + reloading
OperandValue::Pair(..) => {
let tmp = self.alloca(layout.size, layout.align.abi);
self.store(args[0].immediate(), tmp, layout.align.abi);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of args[0].immediate() is guaranteed to panic, see my latest additions to the test ICE-ing:

    pub fn immediate(self) -> V {
        match self.val {
            OperandValue::Immediate(s) => s,
            _ => bug!("not immediate: {:?}", self),
        }
    }

Our ABI takes apart ScalarPairs into an Adt(a, b), but only if the ScalarPair consists out of two non-ZST fields. I have no idea how to correctly load / store ScalarPairs, especially given that condition. Maybe @eddyb can help us here?

BackendRepr::ScalarPair(a, b) => {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've been feeling around in the dark, no clue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants