diff options
author | Brian Sullivan <briansul@microsoft.com> | 2019-03-07 14:20:44 -0800 |
---|---|---|
committer | Brian Sullivan <briansul@microsoft.com> | 2019-03-13 15:23:35 -0700 |
commit | ef1d1e86da8406ca86ca98b8d92b038fe1f08d7a (patch) | |
tree | 334222be94dfdfad3951f23ad08daa2b16e652b2 /src/jit/lclvars.cpp | |
parent | e73c7bca3ebc46055cbdfb87adb39334474abb96 (diff) | |
download | coreclr-ef1d1e86da8406ca86ca98b8d92b038fe1f08d7a.tar.gz coreclr-ef1d1e86da8406ca86ca98b8d92b038fe1f08d7a.tar.bz2 coreclr-ef1d1e86da8406ca86ca98b8d92b038fe1f08d7a.zip |
Fix for Issue 21231
When transferring a Zero offset from one GenTree node to another, we need to check if there already is a FieldSeq and append to it.
Added third parameter 'kind' to JitHashTable::Set, and Added enum SetKind
Only allow Set to overwrite an existing entry when kind is set to Overwrite.
Added validation for all calls to JitHashTable::Set
asserting that we don't expect the key to already exist or that we passed Overwrite indicating that we expect to handle it properly.
Added two test cases for Issue 21231
Diffstat (limited to 'src/jit/lclvars.cpp')
-rw-r--r-- | src/jit/lclvars.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index b9cec032b2..a251534bd1 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -1949,7 +1949,7 @@ Compiler::lvaStructFieldInfo Compiler::StructPromotionHelper::GetFieldInfo(CORIN fieldInfo.fldType = compiler->getSIMDTypeForSize(simdSize); fieldInfo.fldSize = simdSize; #ifdef DEBUG - retypedFieldsMap.Set(fieldInfo.fldHnd, fieldInfo.fldType); + retypedFieldsMap.Set(fieldInfo.fldHnd, fieldInfo.fldType, RetypedAsScalarFieldsMap::Overwrite); #endif // DEBUG } } @@ -2053,7 +2053,7 @@ bool Compiler::StructPromotionHelper::TryPromoteStructField(lvaStructFieldInfo& fieldInfo.fldType = fieldVarType; fieldInfo.fldSize = fieldSize; #ifdef DEBUG - retypedFieldsMap.Set(fieldInfo.fldHnd, fieldInfo.fldType); + retypedFieldsMap.Set(fieldInfo.fldHnd, fieldInfo.fldType, RetypedAsScalarFieldsMap::Overwrite); #endif // DEBUG return true; } |