Closed
Bug 818414
Opened 13 years ago
Closed 13 years ago
CodeGenerator::visitValueToInt32 generates suboptimal code
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: bzbarsky, Assigned: evilpies)
Details
Attachments
(1 file)
4.16 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
From JIT Inspector output:
movq %rcx, %r11
shrq $47, %r11
cmpl $0x1fff1, %r11d
je ((1014))
movq %rcx, %r11
shrq $47, %r11
cmpl $0x1fff3, %r11d
je ((1034))
movq %rcx, %r11
shrq $47, %r11
cmpl $0x1fff0, %r11d
ja ((1054))
The repeated movq/shrq are totally unnecessary, afaict.
And later on after some maybe-jumps and a bit of playing with the xmm registers there's more of the same:
movq %rcx, %r11
shrq $47, %r11
cmpl $0x1fff6, %r11d
jne ((1111))
Seems like grabbing the tag once, then testing repeatedly, would be nicer...
Assignee | ||
Comment 1•13 years ago
|
||
Boris, good work, keep them coming. Looks like there are quite a few things that can be optimized when you actually look at the generated code.
Attachment #688905 -
Flags: review?(jdemooij)
Assignee | ||
Updated•13 years ago
|
Assignee: general → evilpies
Status: NEW → ASSIGNED
Comment 2•13 years ago
|
||
Comment on attachment 688905 [details] [diff] [review]
v1
Review of attachment 688905 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch.
Attachment #688905 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Comment 4•13 years ago
|
||
Ups sorry, wrong link...
https://hg.mozilla.org/integration/mozilla-inbound/rev/78c7f99089ea
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•