Implement Vector.Ceiling / Vector.Floor (#31993)
authorGanbarukamo41 <ganbarukamo@gmail.com>
Mon, 16 Mar 2020 22:10:27 +0000 (07:10 +0900)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2020 22:10:27 +0000 (15:10 -0700)
commite37df8b0e3049c3ef122d1b1002005810f90a4a5
treed92063ac7926d2555c4e07477a6772d81f6fbd25
parentf7e7ec6f5552d6a6444aad61426f08b7ed37116f
Implement Vector.Ceiling / Vector.Floor (#31993)

* Add Ceil/Floor to S.P.CoreLib and expose publicly

* Make Ceil/Floor JIT intrinsic

* Add missing identifier for closing endif

* Add JIT test for Ceil/Floor

* Add test for Ceil/Floor in S.Numerics.Vectors
* Also fix the old path for the new structure

* Apply jit-format

* Do not attempt to treat Ceil/Floor if SSE4.1 isn't available

* Mark Vector<T>.Ceiling/Floor as Intrinsic

* Add missing underscore

* Revert "Add missing idenfitier for closing endif"
* Oops

* Add missing breaks
* Oops, again

* Simplify switch case

* Per review suggestion

Co-Authored-By: Egor Chesakov <egor.chesakov@microsoft.com>
Co-authored-by: Egor Chesakov <egor.chesakov@microsoft.com>
16 files changed:
src/coreclr/src/jit/codegen.h
src/coreclr/src/jit/codegenarm64.cpp
src/coreclr/src/jit/lsraarm64.cpp
src/coreclr/src/jit/lsraxarch.cpp
src/coreclr/src/jit/simd.cpp
src/coreclr/src/jit/simdcodegenxarch.cpp
src/coreclr/src/jit/simdintrinsiclist.h
src/coreclr/tests/src/JIT/SIMD/VectorCeilFloor.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/SIMD/VectorCeilFloor_r.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/SIMD/VectorCeilFloor_ro.csproj [new file with mode: 0644]
src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs
src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.tt
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.tt
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_Operations.cs