summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
blob: d805341991d8363e437470c61855b1a9f58cd952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- // MIR for `test` before ConstProp
+ // MIR for `test` after ConstProp
  
  fn test(_1: bool, _2: bool) -> bool {
      debug x => _1;
      debug y => _2;
      let mut _0: bool;
      let mut _3: bool;
      let mut _4: bool;
      let mut _5: bool;
      let mut _6: bool;
  
      bb0: {
          StorageLive(_3);
-         _3 = BitOr(_2, const true);
+         _3 = const true;
          StorageLive(_5);
-         _5 = BitAnd(_1, const false);
-         _0 = BitAnd(move _3, move _5);
+         _5 = const false;
+         _0 = const false;
          StorageDead(_5);
          StorageDead(_3);
          return;
      }
  }