rust/tests/mir-opt/gvn_on_unsafe_binder.propagate.GVN.diff
2025-03-15 18:10:55 +00:00

35 lines
847 B
Diff

- // MIR for `propagate` before GVN
+ // MIR for `propagate` after GVN
fn propagate() -> unsafe<> i32 {
let mut _0: unsafe<> i32;
let _1: i32;
let mut _3: i32;
scope 1 {
debug x => _1;
let _2: unsafe<> i32;
scope 2 {
debug binder => _2;
}
}
bb0: {
- StorageLive(_1);
+ nop;
_1 = const 1_i32;
StorageLive(_2);
StorageLive(_3);
- _3 = copy _1;
- _2 = wrap_binder!(move _3; unsafe<> i32);
+ _3 = const 1_i32;
+ _2 = const {transmute(0x00000001): unsafe<> i32};
StorageDead(_3);
- _0 = move _2;
+ _0 = const {transmute(0x00000001): unsafe<> i32};
StorageDead(_2);
- StorageDead(_1);
+ nop;
return;
}
}