File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1015,8 +1015,8 @@ mod impls {
10151015                    // The order here is important to generate more optimal assembly. 
10161016                    // See <https://github.com/rust-lang/rust/issues/63758> for more info. 
10171017                    if  * self  < * other {  Less  } 
1018-                     else if  * self  >  * other {  Greater  } 
1019-                     else {  Equal  } 
1018+                     else if  * self  ==  * other {  Equal  } 
1019+                     else {  Greater  } 
10201020                } 
10211021            } 
10221022        ) * ) 
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use std::cmp::Ordering;
1111#[ no_mangle]  
1212pub  fn  cmp_signed ( a :  i64 ,  b :  i64 )  -> Ordering  { 
1313// CHECK: icmp slt 
14- // CHECK: icmp sgt  
14+ // CHECK: icmp ne  
1515// CHECK: zext i1 
1616// CHECK: select i1 
1717    a. cmp ( & b) 
@@ -21,7 +21,7 @@ pub fn cmp_signed(a: i64, b: i64) -> Ordering {
2121#[ no_mangle]  
2222pub  fn  cmp_unsigned ( a :  u32 ,  b :  u32 )  -> Ordering  { 
2323// CHECK: icmp ult 
24- // CHECK: icmp ugt  
24+ // CHECK: icmp ne  
2525// CHECK: zext i1 
2626// CHECK: select i1 
2727    a. cmp ( & b) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments