-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE; two sources of truth on how stuff is returned do not agree with each other #38727
Comments
Since discriminants do not support i128 yet, lets just calculate the boundaries within the 64 bits that are supported. This also avoids an issue with bootstrapping on 32 bit systems due to rust-lang#38727.
Ugh, |
Why Or actually, why is it decided that the value ought to be returned by value? Its a 64 bit return on a 32 bit target. Seems sketchy? |
Both the ABI and the immediate check are correct IMO. The problem isn't that they don't agree, the problem is that we have code that incorrectly assumes that they always do. The ABI rules can be weird and we might even end up supporting several conflicting calling convention ABIs per platform, so we should just do the load there instead of trying to force it to be immediate. |
Yes, @Mark-Simulacrum has just started playing with it. The short version is "always load if you need an immediate instead of panicking". |
triage: P-high |
Consider this code:
if compiled targetting
i686
target, this ICEs withThis is because ABI code claims that this u64 enum has to be returned via value (i.e.
ret i64 %smth
):Whereas MIR only has
OperandRef(Ref(...))
because thecommon::is_immediate_type
returns false for this enum. Callingimmediate()
on thisOperandRef
then causes this ICE.This is a regression from the old->MIR trans move.
The text was updated successfully, but these errors were encountered: