From 1ecfd387d9d96bcb146e61253d251811a04091aa Mon Sep 17 00:00:00 2001 From: Sergey Andreenko Date: Wed, 8 Jul 2020 18:02:53 -0700 Subject: [PATCH 1/2] Add a repro test for #35724 --- .../JitBlue/Runtime_35724/Runtime_35724.cs | 29 +++++++++++++++++++ .../Runtime_35724/Runtime_35724.csproj | 12 ++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.cs create mode 100644 src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.csproj diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.cs b/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.cs new file mode 100644 index 00000000000000..a465beaee766cd --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Numerics; +using System.Runtime.CompilerServices; + +// SIMD8 could be retyped as a long in the past and if that long value was CSE-ed together with original SIMD8 +// values we could hit an assert `IsCompatibleType(cseLclVarTyp, expTyp)`. + +class Runtime_35724 +{ + [MethodImpl(MethodImplOptions.NoInlining)] + static Vector2 Test() + { + Vector2 a = new Vector2(1); + Vector2 b = new Vector2(2); + Vector2 c = a / b; + Vector2 d = a / b; + Console.WriteLine(c.X + d.Y); + return a / b; + } + + public static int Main() + { + Test(); + return 100; + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.csproj new file mode 100644 index 00000000000000..986494e092b5aa --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_35724/Runtime_35724.csproj @@ -0,0 +1,12 @@ + + + Exe + + + + True + + + + + From 7fead10bf290d08d456a5959fff70060e475f009 Mon Sep 17 00:00:00 2001 From: Sergey Andreenko Date: Thu, 9 Jul 2020 15:55:07 -0700 Subject: [PATCH 2/2] move it to pri1. --- .../JIT/Regression/JitBlue/Runtime_35144/Runtime_35144.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_35144/Runtime_35144.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_35144/Runtime_35144.csproj index 986494e092b5aa..656bedde102452 100644 --- a/src/tests/JIT/Regression/JitBlue/Runtime_35144/Runtime_35144.csproj +++ b/src/tests/JIT/Regression/JitBlue/Runtime_35144/Runtime_35144.csproj @@ -1,6 +1,7 @@ Exe + 1