File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,19 +53,13 @@ static nint Cast_PopCount_To_NInt(ulong value)
5353 }
5454
5555 [ MethodImpl ( MethodImplOptions . NoInlining ) ]
56- static bool TruncatedValueCanBeNegative ( long value )
56+ static long Cast_Long_To_Int_To_Long ( long value )
5757 {
58- return unchecked ( ( int ) value ) < 0 ;
58+ return unchecked ( ( long ) ( int ) value ) ;
5959 }
6060
6161 [ MethodImpl ( MethodImplOptions . NoInlining ) ]
62- static long TruncatingRoundTripMustRemain ( long value )
63- {
64- return ( long ) ( int ) value ;
65- }
66-
67- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
68- static long ZeroExtendingRoundTripMustRemain ( long value )
62+ static long Cast_Long_To_UInt_To_Long ( long value )
6963 {
7064 return unchecked ( ( long ) ( uint ) value ) ;
7165 }
@@ -97,13 +91,10 @@ public static int TestEntryPoint()
9791 if ( Cast_PopCount_To_NInt ( ulong . MaxValue ) != 64 )
9892 return 0 ;
9993
100- if ( ! TruncatedValueCanBeNegative ( 0xFFFF_FFFFL ) )
101- return 0 ;
102-
103- if ( TruncatingRoundTripMustRemain ( 0xFFFF_FFFFL ) != - 1 )
94+ if ( Cast_Long_To_Int_To_Long ( 0xFFFF_FFFFL ) != - 1 )
10495 return 0 ;
10596
106- if ( ZeroExtendingRoundTripMustRemain ( - 1 ) != uint . MaxValue )
97+ if ( Cast_Long_To_UInt_To_Long ( - 1 ) != uint . MaxValue )
10798 return 0 ;
10899
109100 return 100 ;
You can’t perform that action at this time.
0 commit comments