mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
// MIR for `<impl at $DIR/derived_ord.rs:6:10: 6:20>::partial_cmp` after PreCodegen
|
|
|
|
fn <impl at $DIR/derived_ord.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
|
|
debug self => _1;
|
|
debug other => _2;
|
|
let mut _0: std::option::Option<std::cmp::Ordering>;
|
|
let mut _6: std::option::Option<std::cmp::Ordering>;
|
|
let mut _7: i8;
|
|
scope 1 {
|
|
debug cmp => _6;
|
|
}
|
|
scope 2 (inlined std::cmp::impls::<impl PartialOrd for char>::partial_cmp) {
|
|
let mut _3: char;
|
|
let mut _4: char;
|
|
let mut _5: std::cmp::Ordering;
|
|
}
|
|
scope 3 (inlined std::cmp::impls::<impl PartialOrd for i16>::partial_cmp) {
|
|
let mut _8: i16;
|
|
let mut _9: i16;
|
|
let mut _10: std::cmp::Ordering;
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_3);
|
|
_3 = ((*_1).0: char);
|
|
StorageLive(_4);
|
|
_4 = ((*_2).0: char);
|
|
_5 = Cmp(move _3, move _4);
|
|
StorageDead(_4);
|
|
StorageDead(_3);
|
|
_6 = Option::<std::cmp::Ordering>::Some(_5);
|
|
_7 = discriminant(_5);
|
|
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
|
}
|
|
|
|
bb1: {
|
|
StorageLive(_10);
|
|
StorageLive(_8);
|
|
_8 = ((*_1).1: i16);
|
|
StorageLive(_9);
|
|
_9 = ((*_2).1: i16);
|
|
_10 = Cmp(move _8, move _9);
|
|
StorageDead(_9);
|
|
StorageDead(_8);
|
|
_0 = Option::<std::cmp::Ordering>::Some(move _10);
|
|
StorageDead(_10);
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb2: {
|
|
_0 = _6;
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb3: {
|
|
return;
|
|
}
|
|
}
|