-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Don't drop Rvalue::WrapUnsafeBinder
during GVN
#137864
base: master
Are you sure you want to change the base?
Don't drop Rvalue::WrapUnsafeBinder
during GVN
#137864
Conversation
This comment has been minimized.
This comment has been minimized.
e4e50d0
to
70b0c3e
Compare
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
return self.simplify_operand(op, location); | ||
Rvalue::WrapUnsafeBinder(ref mut op, ty) => { | ||
let value = self.simplify_operand(op, location)?; | ||
Value::WrapUnsafeBinder(value, ty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just produce a transmute cast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o true :3 that works
r=me with WrapUnsafeBinder removed |
70b0c3e
to
33621bd
Compare
Is there a reason why we can't use transmute lowering generally in runtime MIR? |
errs tried it out and it didn't actually simplify things |
...and instead use
Value::WrapUnsafeBinder
to properly propagate consts throughwrap_binder!()
in GVN.Fixes #137846
r? oli-obk