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

Assertion failed 'src->OperIs(GT_LCL_VAR, GT_LCL_FLD, GT_FIELD, GT_IND, GT_OBJ, GT_CALL, GT_MKREFANY, GT_RET_EXPR, GT_COMMA, GT_CNS_VEC) || ((src->TypeGet() != TYP_STRUCT) && src->OperIsSIMD())' #76550

Closed
BruceForstall opened this issue Oct 3, 2022 · 5 comments · Fixed by #76628
Assignees
Labels
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
Milestone

Comments

@BruceForstall
Copy link
Member

arm64 jitstress1/2

pipeline: runtime-coreclr jitstress

https://dev.azure.com/dnceng-public/public/_build/results?buildId=38161&view=ms.vss-test-web.build-test-results-tab&runId=760998&resultId=108965&paneView=debug

Test: JIT\Regression\JitBlue\Runtime_72926\Runtime_72926\Runtime_72926.cmd

    JIT\Regression\JitBlue\Runtime_72926\Runtime_72926\Runtime_72926.cmd [FAIL]
      
      Assert failure(PID 1012 [0x000003f4], Thread: 6584 [0x19b8]): Assertion failed 'src->OperIs(GT_LCL_VAR, GT_LCL_FLD, GT_FIELD, GT_IND, GT_OBJ, GT_CALL, GT_MKREFANY, GT_RET_EXPR, GT_COMMA, GT_CNS_VEC) || ((src->TypeGet() != TYP_STRUCT) && src->OperIsSIMD())' in 'Runtime_72926:CallForDoubleAsVector64_AllBitsSet():System.Runtime.Intrinsics.Vector64`1[double]' during 'Morph - Global' (IL size 17; hash 0xaf6e0d68; FullOpts)
      
          File: D:\a\_work\1\s\src\coreclr\jit\importer.cpp Line: 1194
          Image: D:\h\w\B6BD0A45\p\corerun.exe

@dotnet/jit-contrib

@BruceForstall BruceForstall added JitStress CLR JIT issues involving JIT internal stress modes 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 labels Oct 3, 2022
@BruceForstall BruceForstall added this to the 8.0.0 milestone Oct 3, 2022
@ghost
Copy link

ghost commented Oct 3, 2022

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

Issue Details

arm64 jitstress1/2

pipeline: runtime-coreclr jitstress

https://dev.azure.com/dnceng-public/public/_build/results?buildId=38161&view=ms.vss-test-web.build-test-results-tab&runId=760998&resultId=108965&paneView=debug

Test: JIT\Regression\JitBlue\Runtime_72926\Runtime_72926\Runtime_72926.cmd

    JIT\Regression\JitBlue\Runtime_72926\Runtime_72926\Runtime_72926.cmd [FAIL]
      
      Assert failure(PID 1012 [0x000003f4], Thread: 6584 [0x19b8]): Assertion failed 'src->OperIs(GT_LCL_VAR, GT_LCL_FLD, GT_FIELD, GT_IND, GT_OBJ, GT_CALL, GT_MKREFANY, GT_RET_EXPR, GT_COMMA, GT_CNS_VEC) || ((src->TypeGet() != TYP_STRUCT) && src->OperIsSIMD())' in 'Runtime_72926:CallForDoubleAsVector64_AllBitsSet():System.Runtime.Intrinsics.Vector64`1[double]' during 'Morph - Global' (IL size 17; hash 0xaf6e0d68; FullOpts)
      
          File: D:\a\_work\1\s\src\coreclr\jit\importer.cpp Line: 1194
          Image: D:\h\w\B6BD0A45\p\corerun.exe

@dotnet/jit-contrib

Author: BruceForstall
Assignees: -
Labels:

JitStress, area-CodeGen-coreclr, blocking-clean-ci-optional

Milestone: 8.0.0

@BruceForstall
Copy link
Member Author

cc @tannergooding

@tannergooding
Copy link
Member

tannergooding commented Oct 4, 2022

Just leaving some notes for when I finish looking at this tomorrow. Issue is we're encountering a GT_BITCAST.

JitDump.txt

Locals are:

  Name Value Type
this 0x00000222000580e8 [Runtime_72926:CallForDoubleAsVector64_AllBitsSet():System.Runtime.Intrinsics.Vector64`1[double] (0xaf6e0d68)] Compiler *
asgNode 0xcccccccccccccccc ???: [[???, ???] GenTree *
  asgType 0xcc 'Ì' var_types
block 0x0000022200059e40 BB1->BB2; BBJ_ALWAYS BasicBlock *
  curLevel 0xfffffffe unsigned int
dest 0x0000000000000000 GenTree *
destAddr 0x000002220005b8d0 12: [[GT_ADDR, TYP_BYREF] GenTree * {GenTreeOp}
  destFlags GTF_EMPTY (0x00000000) GenTreeFlags
di {m_inlineContext=0x00000222000593a8 {m_InlineStrategy=0x0000022200058ba8 {m_Compiler=0x00000222000580e8 [Runtime_72926:CallForDoubleAsVector64_AllBitsSet():System.Runtime.Intrinsics.Vector64`1[double] (0xaf6e0d68)] ...} ...} ...} const DebugInfo &
pAfterStmt 0x000000c92497ae18 {0x000002220005a878 {...}} Statement * *
src 0x000002220005a720 7: [[GT_BITCAST, TYP_SIMD8] GenTree * {GenTreeOp}
  structHnd 0x0000000000000000 CORINFO_CLASS_STRUCT_ *
usedDI {m_inlineContext=0x00000222000593a8 {m_InlineStrategy=0x0000022200058ba8 {m_Compiler=0x00000222000580e8 [Runtime_72926:CallForDoubleAsVector64_AllBitsSet():System.Runtime.Intrinsics.Vector64`1[double] (0xaf6e0d68)] ...} ...} ...} DebugInfo

Stack trace is:

 	clrjit_universal_arm64_x64.dll!assertAbort(const char * why, const char * file, unsigned int line) Line 304	C++
>	clrjit_universal_arm64_x64.dll!Compiler::impAssignStructPtr(GenTree * destAddr, GenTree * src, CORINFO_CLASS_STRUCT_ * structHnd, unsigned int curLevel, Statement * * pAfterStmt, const DebugInfo & di, BasicBlock * block) Line 1192	C++
 	clrjit_universal_arm64_x64.dll!Compiler::impAssignStruct(GenTree * dest, GenTree * src, CORINFO_CLASS_STRUCT_ * structHnd, unsigned int curLevel, Statement * * pAfterStmt, const DebugInfo & di, BasicBlock * block) Line 1136	C++
 	clrjit_universal_arm64_x64.dll!Compiler::gtNewTempAssign(unsigned int tmp, GenTree * val, Statement * * pAfterStmt, const DebugInfo & di, BasicBlock * block) Line 15462	C++
 	clrjit_universal_arm64_x64.dll!Compiler::fgMergeBlockReturn(BasicBlock * block) Line 15247	C++
 	clrjit_universal_arm64_x64.dll!Compiler::fgMorphBlocks() Line 15153	C++
 	clrjit_universal_arm64_x64.dll!Compiler::compCompile::__l2::<lambda_3>::operator()() Line 4589	C++
 	clrjit_universal_arm64_x64.dll!ActionPhase<`Compiler::compCompile'::`2'::<lambda_3>>::DoPhase() Line 65	C++
 	clrjit_universal_arm64_x64.dll!Phase::Run() Line 61	C++
 	clrjit_universal_arm64_x64.dll!DoPhase<`Compiler::compCompile'::`2'::<lambda_3>>(Compiler * _compiler, Phases _phase, Compiler::compCompile::__l2::<lambda_3> _action) Line 79	C++
 	clrjit_universal_arm64_x64.dll!Compiler::compCompile(void * * methodCodePtr, unsigned int * methodCodeSize, JitFlags * compileFlags) Line 4623	C++
 	clrjit_universal_arm64_x64.dll!Compiler::compCompileHelper(CORINFO_MODULE_STRUCT_ * classPtr, ICorJitInfo * compHnd, CORINFO_METHOD_INFO * methodInfo, void * * methodCodePtr, unsigned int * methodCodeSize, JitFlags * compileFlags) Line 6617	C++
 	clrjit_universal_arm64_x64.dll!`Compiler::compCompile'::`124'::__Body::Run(Compiler::compCompile::__l2::__JITParam * __JITpParam) Line 5777	C++
 	clrjit_universal_arm64_x64.dll!Compiler::compCompile(CORINFO_MODULE_STRUCT_ * classPtr, void * * methodCodePtr, unsigned int * methodCodeSize, JitFlags * compileFlags) Line 5781	C++
 	clrjit_universal_arm64_x64.dll!``jitNativeCode'::`8'::__Body::Run'::`6'::__Body::Run(jitNativeCode::__l8::__Body::Run::__l5::__JITParam * __JITpParam) Line 7260	C++
 	clrjit_universal_arm64_x64.dll!`jitNativeCode'::`8'::__Body::Run(jitNativeCode::__l2::__JITParam * __JITpParam) Line 7263	C++
 	clrjit_universal_arm64_x64.dll!jitNativeCode(CORINFO_METHOD_STRUCT_ * methodHnd, CORINFO_MODULE_STRUCT_ * classPtr, ICorJitInfo * compHnd, CORINFO_METHOD_INFO * methodInfo, void * * methodCodePtr, unsigned int * methodCodeSize, JitFlags * compileFlags, void * inlineInfoPtr) Line 7287	C++
 	clrjit_universal_arm64_x64.dll!CILJit::compileMethod(ICorJitInfo * compHnd, CORINFO_METHOD_INFO * methodInfo, unsigned int flags, unsigned char * * entryAddress, unsigned int * nativeSizeOfCode) Line 259	C++
 	[Inline Frame] coreclr.dll!invokeCompileMethodHelper(EEJitManager *) Line 12303	C++
 	coreclr.dll!invokeCompileMethod(EEJitManager * jitMgr, CEEInfo * comp, CORINFO_METHOD_INFO * info, CORJIT_FLAGS jitFlags, unsigned char * * nativeEntry, unsigned int * nativeSizeOfCode) Line 12439	C++
 	coreclr.dll!UnsafeJitFunction(PrepareCodeConfig * config, COR_ILMETHOD_DECODER * ILHeader, CORJIT_FLAGS flags, unsigned long * pSizeOfCode) Line 12912	C++
 	coreclr.dll!MethodDesc::JitCompileCodeLocked(PrepareCodeConfig * pConfig, ListLockEntryBase<NativeCodeVersion> * pEntry, unsigned long * pSizeOfCode, CORJIT_FLAGS * pFlags) Line 952	C++
 	coreclr.dll!MethodDesc::JitCompileCodeLockedEventWrapper(PrepareCodeConfig * pConfig, ListLockEntryBase<NativeCodeVersion> * pEntry) Line 823	C++
 	coreclr.dll!MethodDesc::JitCompileCode(PrepareCodeConfig * pConfig) Line 763	C++
 	coreclr.dll!MethodDesc::PrepareILBasedCode(PrepareCodeConfig * pConfig) Line 426	C++
 	coreclr.dll!MethodDesc::PrepareCode(PrepareCodeConfig * pConfig) Line 323	C++
 	coreclr.dll!CodeVersionManager::PublishVersionableCodeIfNecessary(MethodDesc * pMethodDesc, CallerGCMode callerGCMode, bool * doBackpatchRef, bool * doFullBackpatchRef) Line 1698	C++
 	coreclr.dll!MethodDesc::DoPrestub(MethodTable * pDispatchingMT, CallerGCMode callerGCMode) Line 2109	C++
 	coreclr.dll!PreStubWorker(TransitionBlock * pTransitionBlock, MethodDesc * pMD) Line 1938	C++
 	coreclr.dll!ThePreStub�()	Unknown
 	00007ffa4e5d51a4()	Unknown
 	0000000000000001()	Unknown

@tannergooding
Copy link
Member

Relevant place that's modifying it is:

*************** Starting PHASE Morph - Structs/AddrExp
LocalAddressVisitor visiting statement:
STMT00000 ( 0x000[E-] ... 0x007 )
               [000004] -A---------                         *  ASG       double
               [000003] D------N---                         +--*  LCL_VAR   double V00 loc0
               [000002] -----------                         \--*  CNS_DBL   double -nan(0xffffffffffffffff)


LocalAddressVisitor visiting statement:
STMT00001 ( 0x008[E-] ... 0x010 )
               [000008] ---X-------                         *  RETURN    simd8
               [000007] n--X-------                         \--*  OBJ       simd8 <System.Runtime.Intrinsics.Vector64`1[System.Double]>
               [000006] -----------                            \--*  ADDR      long
               [000005] -------N---                               \--*  LCL_VAR   double V00 loc0
LocalAddressVisitor modified statement:
STMT00001 ( 0x008[E-] ... 0x010 )
               [000008] ---X-------                         *  RETURN    simd8
               [000007] ---X-------                         \--*  BITCAST   simd8
               [000006] -----------                            \--*  LCL_VAR   double V00 loc0

@tannergooding
Copy link
Member

I've not confirmed yet, but I'd speculate this is related to #76155

Might just be an assert that needs updating.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 4, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 5, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants