summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/pre-codegen/chained_comparison.naive.PreCodegen.after.mir
blob: c7fd397fcd4ffcc2aec8e67c1b5cad4b949d47e5 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// MIR for `naive` after PreCodegen

fn naive(_1: &Blueprint, _2: &Blueprint) -> bool {
    debug a => _1;
    debug b => _2;
    let mut _0: bool;
    let mut _3: u32;
    let mut _4: u32;
    let mut _5: bool;
    let mut _6: bool;
    let mut _7: u32;
    let mut _8: u32;
    let mut _9: bool;
    let mut _10: bool;
    let mut _11: u32;
    let mut _12: u32;
    let mut _13: bool;
    let mut _14: bool;
    let mut _15: u32;
    let mut _16: u32;
    let mut _17: bool;
    let mut _18: u32;
    let mut _19: u32;
    let mut _20: bool;

    bb0: {
        StorageLive(_14);
        StorageLive(_10);
        StorageLive(_6);
        StorageLive(_5);
        StorageLive(_3);
        _3 = ((*_1).0: u32);
        StorageLive(_4);
        _4 = ((*_2).0: u32);
        _5 = Eq(move _3, move _4);
        StorageDead(_4);
        StorageDead(_3);
        switchInt(move _5) -> [0: bb1, otherwise: bb2];
    }

    bb1: {
        _6 = const false;
        goto -> bb3;
    }

    bb2: {
        StorageLive(_9);
        StorageLive(_7);
        _7 = ((*_1).1: u32);
        StorageLive(_8);
        _8 = ((*_2).1: u32);
        _9 = Eq(move _7, move _8);
        StorageDead(_8);
        StorageDead(_7);
        _6 = move _9;
        goto -> bb3;
    }

    bb3: {
        StorageDead(_9);
        StorageDead(_5);
        switchInt(move _6) -> [0: bb4, otherwise: bb5];
    }

    bb4: {
        _10 = const false;
        goto -> bb6;
    }

    bb5: {
        StorageLive(_13);
        StorageLive(_11);
        _11 = ((*_1).2: u32);
        StorageLive(_12);
        _12 = ((*_2).2: u32);
        _13 = Eq(move _11, move _12);
        StorageDead(_12);
        StorageDead(_11);
        _10 = move _13;
        goto -> bb6;
    }

    bb6: {
        StorageDead(_13);
        StorageDead(_6);
        switchInt(move _10) -> [0: bb7, otherwise: bb8];
    }

    bb7: {
        _14 = const false;
        goto -> bb9;
    }

    bb8: {
        StorageLive(_17);
        StorageLive(_15);
        _15 = ((*_1).3: u32);
        StorageLive(_16);
        _16 = ((*_2).3: u32);
        _17 = Eq(move _15, move _16);
        StorageDead(_16);
        StorageDead(_15);
        _14 = move _17;
        goto -> bb9;
    }

    bb9: {
        StorageDead(_17);
        StorageDead(_10);
        switchInt(move _14) -> [0: bb10, otherwise: bb11];
    }

    bb10: {
        _0 = const false;
        goto -> bb12;
    }

    bb11: {
        StorageLive(_20);
        StorageLive(_18);
        _18 = ((*_1).4: u32);
        StorageLive(_19);
        _19 = ((*_2).4: u32);
        _20 = Eq(move _18, move _19);
        StorageDead(_19);
        StorageDead(_18);
        _0 = move _20;
        goto -> bb12;
    }

    bb12: {
        StorageDead(_20);
        StorageDead(_14);
        return;
    }
}