summaryrefslogtreecommitdiff
path: root/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/Regressions/coreclr/GitHub_27937/test27937.cs')
-rw-r--r--tests/src/Regressions/coreclr/GitHub_27937/test27937.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs b/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs
new file mode 100644
index 0000000000..7056ed8577
--- /dev/null
+++ b/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs
@@ -0,0 +1,39 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Runtime.Intrinsics;
+
+class Test27937
+{
+ static unsafe void calc(float* fa, float* fb)
+ {
+ float* pb = fb;
+ float* eb = pb + 16;
+
+ do
+ {
+ float* pa = fa;
+ float* ea = pa + 16;
+ var va = Vector128<float>.Zero;
+
+ do
+ {
+ *pa = va.ToScalar();
+
+ pa += Vector128<float>.Count;
+ pb += Vector128<float>.Count;
+ } while (pa < ea);
+
+ } while (pb < eb);
+ }
+
+ static unsafe int Main()
+ {
+ float* a = stackalloc float[16];
+ float* b = stackalloc float[16];
+
+ calc(a, b);
+
+ return 100;
+ }
+}