-
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
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 |
33621bd
to
13134dd
Compare
@bors r=oli-obk rollup |
Rollup of 16 pull requests Successful merges: - rust-lang#133055 (Expand `CloneToUninit` documentation.) - rust-lang#137147 (Add exclude to config.toml) - rust-lang#137864 (Don't drop `Rvalue::WrapUnsafeBinder` during GVN) - rust-lang#137890 (doc: clarify that consume can be called after BufReader::peek) - rust-lang#137956 (Add RTN support to rustdoc) - rust-lang#137968 (Properly escape regexes in Python scripts) - rust-lang#138082 (Remove `#[cfg(not(test))]` gates in `core`) - rust-lang#138275 (expose `is_s390x_feature_detected!` from `std::arch`) - rust-lang#138303 (Fix Ptr inconsistency in {Rc,Arc}) - rust-lang#138309 (Add missing doc for intrinsic (Fix PR135334)) - rust-lang#138323 (Expand and organize `offset_of!` documentation.) - rust-lang#138329 (debug-assert that the size_hint is well-formed in `collect`) - rust-lang#138465 (linkchecker: bump html5ever) - rust-lang#138471 (Clean up some tests in tests/ui) - rust-lang#138472 (Add codegen test for rust-lang#129795) - rust-lang#138484 (Use lit span when suggesting suffix lit cast) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137864 - compiler-errors:unsafe-binder-gvn, r=oli-obk Don't drop `Rvalue::WrapUnsafeBinder` during GVN ...and instead use `Value::WrapUnsafeBinder` to properly propagate consts through `wrap_binder!()` in GVN. Fixes rust-lang#137846 r? oli-obk
...and instead use
Value::WrapUnsafeBinder
to properly propagate consts throughwrap_binder!()
in GVN.Fixes #137846
r? oli-obk