File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1015,8 +1015,8 @@ mod impls {
1015
1015
// The order here is important to generate more optimal assembly.
1016
1016
// See <https://github.com/rust-lang/rust/issues/63758> for more info.
1017
1017
if * self < * other { Less }
1018
- else if * self > * other { Greater }
1019
- else { Equal }
1018
+ else if * self == * other { Equal }
1019
+ else { Greater }
1020
1020
}
1021
1021
}
1022
1022
) * )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use std::cmp::Ordering;
11
11
#[ no_mangle]
12
12
pub fn cmp_signed ( a : i64 , b : i64 ) -> Ordering {
13
13
// CHECK: icmp slt
14
- // CHECK: icmp sgt
14
+ // CHECK: icmp ne
15
15
// CHECK: zext i1
16
16
// CHECK: select i1
17
17
a. cmp ( & b)
@@ -21,7 +21,7 @@ pub fn cmp_signed(a: i64, b: i64) -> Ordering {
21
21
#[ no_mangle]
22
22
pub fn cmp_unsigned ( a : u32 , b : u32 ) -> Ordering {
23
23
// CHECK: icmp ult
24
- // CHECK: icmp ugt
24
+ // CHECK: icmp ne
25
25
// CHECK: zext i1
26
26
// CHECK: select i1
27
27
a. cmp ( & b)
You can’t perform that action at this time.
0 commit comments