diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2017-08-07 17:05:46 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2017-08-07 17:05:46 -0700 |
commit | 5783c29cc004681c93209feed522ee4b7deae461 (patch) | |
tree | eeceb86db79fa4ab1f97947be2cf9ea9315cbce5 /src | |
parent | d98f9272f5acae92279f9fa1f83320e78a6e5201 (diff) | |
download | coreclr-5783c29cc004681c93209feed522ee4b7deae461.tar.gz coreclr-5783c29cc004681c93209feed522ee4b7deae461.tar.bz2 coreclr-5783c29cc004681c93209feed522ee4b7deae461.zip |
Fix VSO 475427.
In addition to repredicting if the frame size is large enough to require
that we reserve `r10`, we also need to throw out any previous
prediction. If we do not, we may decide to reuse it if uses less stack
space than the reprediction.
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/regalloc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jit/regalloc.cpp b/src/jit/regalloc.cpp index e522c008ab..a60704008a 100644 --- a/src/jit/regalloc.cpp +++ b/src/jit/regalloc.cpp @@ -6473,12 +6473,16 @@ void Compiler::rpPredictRegUse() #ifdef _TARGET_ARM_ // The spill count may be now high enough that we now need to reserve r10. If this is the case, we'll need to - // reserve r10, and if it was used, repredict. + // reserve r10, and if it was used, throw out the last prediction and repredict. if (((codeGen->regSet.rsMaskResvd & RBM_OPT_RSVD) == 0) && compRsvdRegCheck(REGALLOC_FRAME_LAYOUT)) { codeGen->regSet.rsMaskResvd |= RBM_OPT_RSVD; allAcceptableRegs &= ~RBM_OPT_RSVD; - mustPredict = (regUsed & RBM_OPT_RSVD) != 0; + if ((regUsed & RBM_OPT_RSVD) != 0) + { + mustPredict = true; + rpBestRecordedPrediction = nullptr; + } } #endif |