diff options
author | Sergey Andreenko <seandree@microsoft.com> | 2018-10-30 13:38:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 13:38:50 -0700 |
commit | 1f62917ca7c4d16cb5b4e12eaf4fd35f5cbb8715 (patch) | |
tree | efea50ba5ff5e92bb6cab8f88dd4e070d6886d11 /src/jit | |
parent | 626def86af589734999a0e62d3a83c2acb9de54a (diff) | |
download | coreclr-1f62917ca7c4d16cb5b4e12eaf4fd35f5cbb8715.tar.gz coreclr-1f62917ca7c4d16cb5b4e12eaf4fd35f5cbb8715.tar.bz2 coreclr-1f62917ca7c4d16cb5b4e12eaf4fd35f5cbb8715.zip |
Fix `JitStressRegs=0x1` issue with `RefTypeUpperVectorSaveDef`. (#20623)
* Add a repro test.
* Fix the issue.
* Add comments
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/lsra.cpp | 1 | ||||
-rw-r--r-- | src/jit/lsrabuild.cpp | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 5e4cdcbd9c..db677bd19a 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -5557,6 +5557,7 @@ void LinearScan::allocateRegisters() if (refType == RefTypeUpperVectorSaveDef) { // TODO-CQ: Determine whether copying to two integer callee-save registers would be profitable. + // TODO CQ: Save the value directly to memory, #18144. // TODO-ARM64-CQ: Determine whether copying to one integer callee-save registers would be // profitable. diff --git a/src/jit/lsrabuild.cpp b/src/jit/lsrabuild.cpp index 8675910b6c..3326372cda 100644 --- a/src/jit/lsrabuild.cpp +++ b/src/jit/lsrabuild.cpp @@ -1611,6 +1611,14 @@ void LinearScan::buildRefPositionsForNode(GenTree* tree, BasicBlock* block, Lsra { minRegCountForRef++; } +#if FEATURE_PARTIAL_SIMD_CALLEE_SAVE + else if (newRefPosition->refType == RefTypeUpperVectorSaveDef) + { + // TODO-Cleanup: won't need a register once #18144 is fixed. + minRegCountForRef += 1; + } +#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE + newRefPosition->minRegCandidateCount = minRegCountForRef; if (newRefPosition->IsActualRef() && doReverseCallerCallee()) { @@ -2492,7 +2500,7 @@ void LinearScan::BuildDefsWithKills(GenTree* tree, int dstCount, regMaskTP dstCa #if FEATURE_PARTIAL_SIMD_CALLEE_SAVE VARSET_TP liveLargeVectors(VarSetOps::UninitVal()); bool doLargeVectorRestore = false; -#endif +#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE if (killMask != RBM_NONE) { buildKillPositionsForNode(tree, currentLoc + 1, killMask); @@ -2505,7 +2513,7 @@ void LinearScan::BuildDefsWithKills(GenTree* tree, int dstCount, regMaskTP dstCa buildUpperVectorSaveRefPositions(tree, currentLoc + 1, killMask)); doLargeVectorRestore = true; } -#endif +#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE } // Now, create the Def(s) |