You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: Bad codegen - using wrong var for field access #78310
// Generated by Fuzzlyn v1.5 on 2022-11-14 02:52:08// Run on Arm64 Windows// Seed: 11038715273855459808// Reduced from 96.6 KiB to 0.9 KiB in 00:08:38// Debug: Outputs 0// Release: Outputs 1publicstructS0{publicsbyteF0;publiclongF2;}publicstructS1{publicS0F0;publicbyteF1;publicboolF3;publicS1(bytef1):this(){F1=f1;}}publicclassProgram{publicstaticIRuntimes_rt;publicstaticS1s_23;publicstaticvoidMain(){s_rt=newRuntime();varvr1=newS1(1);M16(s_23,refvr1);}publicstaticvoidM16(S1argThis,refS1arg0){if(s_23.F3){arg0.F0=argThis.F0;}else{arg0=argThis;}s_rt.WriteLine(arg0.F1);}}publicinterfaceIRuntime{voidWriteLine<T>(Tvalue);}publicclassRuntime:IRuntime{publicvoidWriteLine<T>(Tvalue)=>System.Console.WriteLine(value);}
I was able to reproduce this on X64 as well.
Built under Release:
DOTNET_TieredCompilation=0 prints 1
DOTNET_TieredCompilation=1 prints 0 <- expected output
I've yet to do a deep dive into the issue, but I think this line, s_rt.WriteLine(arg0.F1); , the arg0 is always using its original value.
Activity
ghost added
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Activity
jakobbotsch commentedon Nov 14, 2022
Bisected to #77103
jakobbotsch commentedon Nov 14, 2022
Looks like we are not checking equality between
GT_BLK/GT_OBJnodes properly.jakobbotsch commentedon Nov 14, 2022
I'll submit a fix since Andy is out.
JIT: Check layout equality of GT_OBJ/GT_BLK nodes in GenTree::Compare
JIT: Check layout equality of GT_OBJ/GT_BLK nodes in GenTree::Compare (…