-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mono][interp] Add vectorization for Vector4 (#87822)
* [mono][interp] Reuse vectorization for Vector4 Which is pretty much Vector<float> * [mono][interp] Implement Vector.One for float gparam * [mono][interp] Extract code to be reused later * [mono][interp] Intrinsify Vector<T> ctor and Vector4 ctor The constructors receive each element as an argument. This is the same as `Vector128.Create` so we reuse that code. This ends up generating a MINT_SIMD_V128_I*_CREATE opcode which receives each element value as an argument. * [mono][interp] Track r4 var value during interpreter optimizations Since it is common to instantiate Vector4 with constant values, add also support for tracking R4 values during optimizations. If all elements are constant, we generate instead a single MINT_SIMD_V128_LDC, which has the entire vector value embedded in the instruction stream. * [mono][interp] Fix Vector ctor instrinsic when called explicitly * [mono][interp] Replace ldloca + stobj.vt pair with mov.vt * [mono][interp] Return early if vector_klass is not simd type It is not marked as simd type if the generic param is not valid (ex not primitive type). Future checks are not expecting this scenario and can potentially crash.
- Loading branch information
Showing
5 changed files
with
142 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters