Closed Bug 1193515 Opened 9 years ago Closed 9 years ago

IonMonkey: Register allocation spills after reused registers

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1179242

People

(Reporter: sunfish, Unassigned)

Details

(Keywords: perf)

For this code:

(function test (glob, env, b) {
  'use asm';
  function add(x) {
    x = x|0;
    x = (((x >> 1) >> 1) >> 1) >> 1;
    return x|0;
  }
  return add;
})();

The register allocator currently spills the value after each shift on x64:

 sarl       $1, %eax 
 movl       %eax, 0xc(%rsp)
 sarl       $1, %eax 
 movl       %eax, 0xc(%rsp)
 sarl       $1, %eax 
 movl       %eax, 0xc(%rsp)
 sarl       $1, %eax 
 movl       %eax, 0xc(%rsp)
The testcase above is also fixed by the changes for bug 1179242.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.