Bug 1138073 - Improve checking when folding and/or blocks in Ion, r=sunfish.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 10 Mar 2015 08:56:57 -0600
changeset 232779 25324890f496ce72259ca5c0ca6098b65cbc848e
parent 232778 5ffdbb39bab8c7d8a476b17542f04450501b16f4
child 232780 9f47df83a8f6b16c02eadeaa4970b11aeeb51753
push id28392
push userkwierso@gmail.com
push dateTue, 10 Mar 2015 22:33:53 +0000
treeherdermozilla-central@440b80b56ba6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
bugs1138073
milestone39.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 1138073 - Improve checking when folding and/or blocks in Ion, r=sunfish.
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -368,16 +368,19 @@ MaybeFoldAndOrBlock(MIRGraph &graph, MBa
     MPhi *phi;
     MTest *finalTest;
     if (!BlockIsSingleTest(phiBlock, testBlock, &phi, &finalTest))
         return;
 
     MDefinition *branchResult = phi->getOperand(phiBlock->indexForPredecessor(branchBlock));
     MDefinition *initialResult = phi->getOperand(phiBlock->indexForPredecessor(initialBlock));
 
+    if (initialResult != initialTest->input())
+        return;
+
     // OK, we found the desired pattern, now transform the graph.
 
     // Remove the phi from phiBlock.
     phiBlock->discardPhi(*phiBlock->phisBegin());
 
     // Change the end of the initial and branch blocks to a test that jumps
     // directly to successors of testBlock, rather than to testBlock itself.