@@ -1052,18 +1052,18 @@ GlobOptBlockData::MergeValueInfo(
10521052 ValueInfo *const toDataValueInfo = toDataVal->GetValueInfo ();
10531053 ValueInfo *const fromDataValueInfo = fromDataVal->GetValueInfo ();
10541054
1055- // Same value
1056- if (toDataValueInfo == fromDataValueInfo)
1057- {
1058- return toDataValueInfo;
1059- }
1060-
10611055 if (toDataValueInfo->IsJsType () || fromDataValueInfo->IsJsType ())
10621056 {
10631057 Assert (toDataValueInfo->IsJsType () && fromDataValueInfo->IsJsType ());
10641058 return this ->MergeJsTypeValueInfo (toDataValueInfo->AsJsType (), fromDataValueInfo->AsJsType (), isLoopBackEdge, sameValueNumber);
10651059 }
10661060
1061+ // Same value
1062+ if (toDataValueInfo == fromDataValueInfo)
1063+ {
1064+ return toDataValueInfo;
1065+ }
1066+
10671067 ValueType newValueType (toDataValueInfo->Type ().Merge (fromDataValueInfo->Type ()));
10681068 if (newValueType.IsLikelyInt ())
10691069 {
@@ -1118,8 +1118,6 @@ GlobOptBlockData::MergeValueInfo(
11181118JsTypeValueInfo*
11191119GlobOptBlockData::MergeJsTypeValueInfo (JsTypeValueInfo * toValueInfo, JsTypeValueInfo * fromValueInfo, bool isLoopBackEdge, bool sameValueNumber)
11201120{
1121- Assert (toValueInfo != fromValueInfo);
1122-
11231121 // On loop back edges we must be conservative and only consider type values which are invariant throughout the loop.
11241122 // That's because in dead store pass we can't correctly track object pointer assignments (o = p), and we may not
11251123 // be able to register correct type checks for the right properties upstream. If we ever figure out how to enhance
@@ -1129,6 +1127,11 @@ GlobOptBlockData::MergeJsTypeValueInfo(JsTypeValueInfo * toValueInfo, JsTypeValu
11291127 return nullptr ;
11301128 }
11311129
1130+ if (toValueInfo == fromValueInfo)
1131+ {
1132+ return toValueInfo;
1133+ }
1134+
11321135 const JITTypeHolder toType = toValueInfo->GetJsType ();
11331136 const JITTypeHolder fromType = fromValueInfo->GetJsType ();
11341137 const JITTypeHolder mergedType = toType == fromType ? toType : JITTypeHolder (nullptr );
0 commit comments