Last Comment Bug 714727 - IonMonkey: Assertion failure: (live->empty()), at LinearScan.cpp:632
: IonMonkey: Assertion failure: (live->empty()), at LinearScan.cpp:632
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: David Anderson [:dvander]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 677337
  Show dependency treegraph
Reported: 2012-01-03 02:17 PST by Jan de Mooij [:jandem]
Modified: 2012-01-18 14:03 PST (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix (1.42 KB, patch)
2012-01-17 15:50 PST, David Anderson [:dvander]
jdemooij: review+
Details | Diff | Splinter Review

Description User image Jan de Mooij [:jandem] 2012-01-03 02:17:01 PST
ion/inlining/inline-callarg-bailout-phi.js triggers this assert with --ion -n
Comment 1 User image Jan de Mooij [:jandem] 2012-01-03 02:57:20 PST
This is a GVN bug. The greedy allocator does not assert but gives incorrect results for the following testcase:
function add(x, y) {
    var z;
    if (x & 0x1)
        z = x + y;
        z = x + y;
    return z;

for(var i=0; i<100; i++) {
    print(add(i, i));
GVN removes the second x + y, which seems bogus.
Comment 2 User image Jan de Mooij [:jandem] 2012-01-03 05:04:12 PST
MPhi::foldsTo looks at the value numbers of its operands, and if they are equal, the MPhi is folded to the first operand. The problem is, unlike ValueNumberer::findDominatingDef, this does not consider the dominator tree. So, for the testcase in comment 1, the phi is replaced with the first "x + y"...
Comment 3 User image David Anderson [:dvander] 2012-01-17 15:50:24 PST
Created attachment 589329 [details] [diff] [review]

Let's do the easy fix for now and just only eliminate phis based on ssa name, rather than value numbers.
Comment 4 User image David Anderson [:dvander] 2012-01-18 14:03:04 PST

Note You need to log in before you can comment on or make changes to this bug.