diff options
author | Sergey Andreenko <AC-93@MAIL.RU> | 2015-08-17 17:48:22 -0700 |
---|---|---|
committer | Sergey Andreenko <AC-93@MAIL.RU> | 2015-08-27 09:19:34 -0700 |
commit | 5621bf61bc3012c45845f9dd081500da0f07c4d8 (patch) | |
tree | f443af99118404a6d448ef93d86ad87f5639e1b6 /tests/src/JIT/SIMD/Ldfld.cs | |
parent | 08ef243f5d7d3093f1d2b2991ae988e490ff9cfd (diff) | |
download | coreclr-5621bf61bc3012c45845f9dd081500da0f07c4d8.tar.gz coreclr-5621bf61bc3012c45845f9dd081500da0f07c4d8.tar.bz2 coreclr-5621bf61bc3012c45845f9dd081500da0f07c4d8.zip |
SIMD tests
Commit includes SIMD tests of two types:
1) Intrinsic tests, that call functions from RyuJIT SIMD intrinsic list.
2) Bytecode tests, which generate different bytecodes in IL with SIMD
struct.
Diffstat (limited to 'tests/src/JIT/SIMD/Ldfld.cs')
-rw-r--r-- | tests/src/JIT/SIMD/Ldfld.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/src/JIT/SIMD/Ldfld.cs b/tests/src/JIT/SIMD/Ldfld.cs new file mode 100644 index 0000000000..4aa9bf1fb7 --- /dev/null +++ b/tests/src/JIT/SIMD/Ldfld.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Point = System.Numerics.Vector4; + +namespace VectorMathTests +{ + class Program + { + + static float Do(Point p) + { + return p.X; + } + + struct S + { + public Point p; + } + + class C + { + public Point p; + } + + + static int Main(string[] args) + { + Point p = new Point(1, 2, 3, 4); + + S s = new S(); + C c = new C(); + s.p.X = 1; + c.p.Y = 2; + if (Do(s.p) != 1) + { + return 0; + } + if (c.p.X != 0 || c.p.Y != 2) + { + return 0; + } + + return 100; + } + } +} |