Bug 1255008: IonMonkey - Don't alias when intersection of categories is empty and typo, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Mon, 02 May 2016 16:07:38 +0200
changeset 295758 4e237f92c4a2f0ec545371af4759ddbdf6ff12df
parent 295757 c0e34e377be4d27ba4a36a5d992dc533b7e018bf
child 295759 3a8d4956f43a24099c83ef3ae01f788353be708a
push id30228
push usercbook@mozilla.com
push dateTue, 03 May 2016 14:18:10 +0000
treeherdermozilla-central@0a25833062a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1255008
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1255008: IonMonkey - Don't alias when intersection of categories is empty and typo, r=jandem
js/src/jit/FlowAliasAnalysis.cpp
js/src/jit/MIR.cpp
--- a/js/src/jit/FlowAliasAnalysis.cpp
+++ b/js/src/jit/FlowAliasAnalysis.cpp
@@ -202,18 +202,18 @@ LoadAliasesStore(MDefinition* load, MDef
 
     // Default to alias control instructions which indicates loops.
     // Control instructions are special, since we need to determine
     // if it aliases anything in the full loop. Which we do lateron.
     if (store->isControlInstruction())
         return true;
 
     // Check if the alias categories alias eachother.
-    if (!(load->getAliasSet() & store->getAliasSet()).isNone())
-        return true;
+    if ((load->getAliasSet() & store->getAliasSet()).isNone())
+        return false;
 
     // Check if the instruction might alias eachother.
     MDefinition::AliasType type = load->mightAlias(store);
     if (type != MDefinition::AliasType::NoAlias)
         return true;
 
     return false;
 }
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -4941,18 +4941,16 @@ MElements::mightAlias(const MDefinition*
         return AliasType::MayAlias;
 
     const MDefinition* storeObj = GetStoreObject(store);
     if (!storeObj)
         return AliasType::MayAlias;
     if (!storeObj->resultTypeSet())
         return AliasType::MayAlias;
 
-        return AliasType::MayAlias;
-
     if (input()->resultTypeSet()->objectsIntersect(storeObj->resultTypeSet()))
         return AliasType::MayAlias;
     return AliasType::NoAlias;
 }
 
 MDefinition::AliasType
 MLoadElement::mightAlias(const MDefinition* store) const
 {