Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest #70124

Closed
VincentBu opened this issue Jun 2, 2022 · 3 comments · Fixed by #70265
Closed
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Milestone

Comments

@VincentBu
Copy link
Contributor

Run: runtime-coreclr libraries-jitstress 20220601.1

Failed test:

net7.0-windows-Release-x64-CoreCLR_checked-no_tiered_compilation-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-jitstress1-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-tailcallstress-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-zapdisable-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

Error message:

Assert.True() Failure
Expected: True
Actual:   False


Stack trace
   at System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest() in /_/src/libraries/System.Numerics.Vectors/tests/Matrix3x2Tests.cs:line 241
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64

No Kusto information.

@VincentBu VincentBu added area-System.Numerics os-windows JitStress CLR JIT issues involving JIT internal stress modes arch-x64 blocking-clean-ci-optional Blocking optional rolling runs labels Jun 2, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 2, 2022
@ghost
Copy link

ghost commented Jun 2, 2022

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

Run: runtime-coreclr libraries-jitstress 20220601.1

Failed test:

net7.0-windows-Release-x64-CoreCLR_checked-no_tiered_compilation-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-jitstress1-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-tailcallstress-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-zapdisable-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

Error message:

Assert.True() Failure
Expected: True
Actual:   False


Stack trace
   at System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest() in /_/src/libraries/System.Numerics.Vectors/tests/Matrix3x2Tests.cs:line 241
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64

No Kusto information.

Author: VincentBu
Assignees: -
Labels:

area-System.Numerics, os-windows, JitStress, arch-x64, blocking-clean-ci-optional

Milestone: -

@SingleAccretion SingleAccretion self-assigned this Jun 5, 2022
@SingleAccretion SingleAccretion added this to the 7.0.0 milestone Jun 5, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jun 5, 2022
@SingleAccretion
Copy link
Contributor

SingleAccretion commented Jun 5, 2022

So, as one would suspect, this has been exposed (but not caused) by #68874.

In the test we have retyping performed by fgMorphArgs generate the following tree:

N004 ( 23, 19) [000014] S-CXG------                         *  CALL      void   System.Numerics.Matrix3x2.CreateRotation $VN.Void
N001 (  3,  3) [000016] ----------- retbuf in rcx           +--*  LCL_VAR_ADDR long   V03 loc2          $200
N002 (  3,  4) [000012] ----------- arg1 in mm1             +--*  CNS_DBL   float  0.52359879016876221 $41
N003 (  3,  4) [000013] ----------- arg2 in r8              \--*  CNS_VEC   long  <0x00000000, 0x00000000> $80

Then CSE comes along and CSEs [000013]:

optValnumCSE morphed tree:
N008 ( 22, 18)              [000014] SACXG------                         *  CALL      void   System.Numerics.Matrix3x2.CreateRotation $VN.Void
N001 (  3,  3)              [000016] ----------- retbuf in rcx           +--*  LCL_VAR_ADDR long   V03 loc2          $200
N002 (  1,  2)              [000430] ----------- arg1 in mm1             +--*  LCL_VAR   float  V32 cse0         u:1 $41
N007 (  4,  5)              [000435] -A--------- arg2 in r8              \--*  COMMA     long   $80
N005 (  3,  4) CSE #02 (def)[000433] -A------R--                            +--*  ASG       long   $VN.Void
N004 (  1,  1)              [000432] D------N---                            |  +--*  LCL_VAR   long   V33 cse1         d:1 $80
N003 (  3,  4)              [000013] -----------                            |  \--*  CNS_VEC   long  <0x00000000, 0x00000000> $80
N006 (  1,  1)              [000434] -----------                            \--*  LCL_VAR   long   V33 cse1         u:1 $80


Working on the replacement of the CSE #02 use at [000202] in BB08
optValnumCSE morphed tree:
N005 (  3,  3)              [000045] -A------R--                         *  ASG       simd8  (copy) $VN.Void
N004 (  1,  1)              [000043] D------N---                         +--*  LCL_VAR   simd8 <System.Numerics.Vector2> V08 tmp1         d:2 $VN.Void
N003 (  3,  3)              [000204] --------R--                         \--*  HWINTRINSIC simd8  float Subtract $1c1
N002 (  1,  1)              [000436] -----------                            +--*  LCL_VAR   long   V33 cse1         u:1 $80
N001 (  1,  1)              [000037] -----------                            \--*  LCL_VAR   simd8 <System.Numerics.Vector2> V02 loc1         u:2 $1c0

It is the latter use that (presumably) causes trouble later on, we emit this for it:

Generating: N281 (  1,  1) [000037] -----------                   t37 =    LCL_VAR   simd8 <System.Numerics.Vector2> V02 loc1         u:2 mm6 REG mm6 $1c0
Generating: N283 (  1,  1) [000436] -----------                  t436 =    LCL_VAR   long   V33 cse1         u:1 rsi (last use) REG rsi $80
                                                                        /--*  t436   long   
                                                                        +--*  t37    simd8  
Generating: N285 (  3,  3) [000204] -----------                  t204 = *  HWINTRINSIC simd8  float Subtract REG mm7 $1c1
							V33 in reg rsi is becoming dead  [000436]
							Live regs: 00000040 {rsi xmm6} => 00000000 {xmm6}
							Live vars: {V02 V29 V33} => {V02 V29}
IN003b:        vsubps   xmm7, rsi, xmm6

@SingleAccretion SingleAccretion added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed area-System.Numerics labels Jun 5, 2022
@ghost
Copy link

ghost commented Jun 5, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Run: runtime-coreclr libraries-jitstress 20220601.1

Failed test:

net7.0-windows-Release-x64-CoreCLR_checked-no_tiered_compilation-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-jitstress1-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-tailcallstress-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

net7.0-windows-Release-x64-CoreCLR_checked-zapdisable-Windows.10.Amd64.Open

- System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest

Error message:

Assert.True() Failure
Expected: True
Actual:   False


Stack trace
   at System.Numerics.Tests.Matrix3x2Tests.Matrix3x2CreateRotationCenterTest() in /_/src/libraries/System.Numerics.Vectors/tests/Matrix3x2Tests.cs:line 241
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64

No Kusto information.

Author: VincentBu
Assignees: SingleAccretion
Labels:

os-windows, JitStress, arch-x64, area-CodeGen-coreclr, blocking-clean-ci-optional

Milestone: 7.0.0

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 5, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants