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
These two tests have apparently been failing in Crossgen2 mode for quite some time but it remained unnoticed because the somewhat hacky implementation of the helixpublishwitharcade.proj script suppressed the tests in the JIT/Intrinsics folder after the JIT/SIMD tests were converted to the merged test model, for more detailed explanation please see:
The test refers to the following class declaration:
public class GenericEnumClass<T> where T : Enum
{
public T field;
}
Without CG2, runtime JIT optimizes the call to typeof(GenericEnumClass<>).GetGenericArguments into a plain
mov rax, [<MethodTablePtr>+0x70]
that apparently has the IsEnum flag set for the type representing the constrained parameter T; in CG2 mode without JIT optimizations, we use the combination of the helper
In CG2 mode with JIT optimizations turned on, we end up calling
GET_RUNTIME_TYPE_HANDLE
immediately followed by the call to GetGenericArguments i.o.w. we optimize out the call to Type.GetTypeFromHandle. In either case the IsEnum check on the first generic argument doesn't hold. At the first glance it seems to me that this is a bug in the implementation of the runtime helper but I may be mistaken.
Thanks
Tomas
/cc @dotnet/jit-contrib
The text was updated successfully, but these errors were encountered:
OS: all
Architecture: all
Example log: https://dev.azure.com/dnceng-public/public/_build/results?buildId=509643&view=results
These two tests have apparently been failing in Crossgen2 mode for quite some time but it remained unnoticed because the somewhat hacky implementation of the
helixpublishwitharcade.proj
script suppressed the tests in theJIT/Intrinsics
folder after theJIT/SIMD
tests were converted to the merged test model, for more detailed explanation please see:#96333
The problematic check is the following one:
The test refers to the following class declaration:
Without CG2, runtime JIT optimizes the call to
typeof(GenericEnumClass<>).GetGenericArguments
into a plainthat apparently has the
IsEnum
flag set for the type representing the constrained parameterT
; in CG2 mode without JIT optimizations, we use the combination of the helperGET_RUNTIME_TYPE_HANDLE
and the managed method
System.Type System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)
In CG2 mode with JIT optimizations turned on, we end up calling
GET_RUNTIME_TYPE_HANDLE
immediately followed by the call to
GetGenericArguments
i.o.w. we optimize out the call toType.GetTypeFromHandle
. In either case theIsEnum
check on the first generic argument doesn't hold. At the first glance it seems to me that this is a bug in the implementation of the runtime helper but I may be mistaken.Thanks
Tomas
/cc @dotnet/jit-contrib
The text was updated successfully, but these errors were encountered: