This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit c07edfa 1 parent d3018ef commit c07edfa Copy full SHA for c07edfa
File tree 3 files changed +6
-3
lines changed
tests/src/JIT/HardwareIntrinsics/X86/Sse
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ static unsafe int Main(string[] args)
31
31
32
32
if ( ! floatTable . CheckResult ( ( x , y ) => {
33
33
var expected = 1 / x [ 0 ] ;
34
+ var remain = Avx . IsSupported ? ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) : true ; // VEX-encoding copies remain elements
34
35
return ( ( Math . Abs ( expected - y [ 0 ] ) <= 0.0003662109375f ) // |Relative Error| <= 1.5 * 2^-12
35
36
|| ( float . IsNaN ( expected ) && float . IsNaN ( y [ 0 ] ) )
36
37
|| ( float . IsNegativeInfinity ( expected ) && float . IsNegativeInfinity ( y [ 0 ] ) )
37
38
|| ( float . IsPositiveInfinity ( expected ) && float . IsPositiveInfinity ( y [ 0 ] ) ) )
38
- && ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) ;
39
+ && remain ;
39
40
} ) )
40
41
{
41
42
Console . WriteLine ( "SSE ReciprocalScalar failed on float:" ) ;
Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ static unsafe int Main(string[] args)
31
31
32
32
if ( ! floatTable . CheckResult ( ( x , y ) => {
33
33
var expected = 1 / MathF . Sqrt ( x [ 0 ] ) ;
34
+ var remain = Avx . IsSupported ? ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) : true ;
34
35
return ( ( Math . Abs ( expected - y [ 0 ] ) <= 0.0003662109375f ) // |Relative Error| <= 1.5 * 2^-12
35
36
|| ( float . IsNaN ( expected ) && float . IsNaN ( y [ 0 ] ) )
36
37
|| ( float . IsNegativeInfinity ( expected ) && float . IsNegativeInfinity ( y [ 0 ] ) )
37
38
|| ( float . IsPositiveInfinity ( expected ) && float . IsPositiveInfinity ( y [ 0 ] ) ) )
38
- && ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) ;
39
+ && remain ;
39
40
} ) )
40
41
{
41
42
Console . WriteLine ( "SSE ReciprocalSqrtScalar failed on float:" ) ;
Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ static unsafe int Main(string[] args)
31
31
32
32
if ( ! floatTable . CheckResult ( ( x , y ) => {
33
33
var expected = MathF . Sqrt ( x [ 0 ] ) ;
34
+ var remain = Avx . IsSupported ? ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) : true ; // VEX-encoding copies remain elements
34
35
return ( ( expected == y [ 0 ] )
35
36
|| ( float . IsNaN ( expected ) && float . IsNaN ( y [ 0 ] ) ) )
36
- && ( y [ 1 ] == x [ 1 ] ) && ( y [ 2 ] == x [ 2 ] ) && ( y [ 3 ] == x [ 3 ] ) ;
37
+ && remain ;
37
38
} ) )
38
39
{
39
40
Console . WriteLine ( "SSE SqrtScalar failed on float:" ) ;
You can’t perform that action at this time.
0 commit comments