rust/tests/mir-opt/const_prop/boolean_identities.test.GVN.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Diff
Raw Normal View History

2023-09-20 21:43:33 +00:00
- // MIR for `test` before GVN
+ // MIR for `test` after GVN
fn test(_1: bool, _2: bool) -> bool {
2023-06-06 09:47:00 -04:00
debug x => _1;
debug y => _2;
let mut _0: bool;
2023-12-02 20:18:14 +00:00
let _3: bool;
2023-06-06 09:47:00 -04:00
let mut _4: bool;
let mut _6: bool;
2023-12-02 20:18:14 +00:00
let mut _7: bool;
let mut _8: bool;
scope 1 {
debug a => _3;
let _5: bool;
scope 2 {
debug b => _5;
}
}
bb0: {
2023-09-20 21:43:33 +00:00
- StorageLive(_3);
+ nop;
2023-12-02 20:18:14 +00:00
StorageLive(_4);
_4 = copy _2;
- _3 = BitOr(move _4, const true);
2023-03-20 21:37:36 +00:00
+ _3 = const true;
2023-12-02 20:18:14 +00:00
StorageDead(_4);
2023-09-20 21:43:33 +00:00
- StorageLive(_5);
+ nop;
2023-12-02 20:18:14 +00:00
StorageLive(_6);
_6 = copy _1;
- _5 = BitAnd(move _6, const false);
2023-03-20 21:37:36 +00:00
+ _5 = const false;
2023-12-02 20:18:14 +00:00
StorageDead(_6);
StorageLive(_7);
2023-03-20 21:37:36 +00:00
- _7 = copy _3;
+ _7 = const true;
2023-12-02 20:18:14 +00:00
StorageLive(_8);
2023-03-20 21:37:36 +00:00
- _8 = copy _5;
2023-12-02 20:18:14 +00:00
- _0 = BitAnd(move _7, move _8);
2023-03-20 21:37:36 +00:00
+ _8 = const false;
+ _0 = const false;
2023-12-02 20:18:14 +00:00
StorageDead(_8);
StorageDead(_7);
2023-09-20 21:43:33 +00:00
- StorageDead(_5);
- StorageDead(_3);
+ nop;
+ nop;
2023-06-06 09:47:00 -04:00
return;
}
}