Closed Bug 483030 Opened 15 years ago Closed 15 years ago

TM: Don't emit overflow guards if the operation is constant

Categories

(Core :: JavaScript Engine, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: gal, Assigned: gal)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

I ran across this bug while reviewing the jit spew from https://bugzilla.mozilla.org/show_bug.cgi?id=480494.

00069:  53  setname "ret"
00073:  54  getlocal 0
00076:  54  getlocal 1
00079:  54  add
00080:  54  setlocal 0
00084:  54  goto 139 (55)
00139:  60  getarg 0
00142:  60  getlocal 1
00145:  60  sub
    sti sp[8] = and4570
    st fmul503[616] = and4570
    sti sp[0] = ld23292
    sti sp[8] = ld23291
    sti sp[0] = add2705
    sti sp[-24] = add2705
    sti sp[0] = ld23291
    sti sp[8] = ld23291
    xt3884 = ov 0
    xt9490: xt xt3884 -> pc=0x1e2f5301 imacpc=0x0 sp+16 rp+0

The sub operation was constant folded here, yet we are checking for overflow.
Attached patch patchSplinter Review
Assignee: general → gal
Attachment #367097 - Flags: review?(danderson)
Attachment #367097 - Flags: review?(danderson) → review+
http://hg.mozilla.org/tracemonkey/rev/797ba90aed16

P2. The failure mode are unnecessary side-exits (perf regression), not
correctness.
Whiteboard: fixed-in-tracemonkey
Priority: -- → P2
Flags: wanted1.9.1?
http://hg.mozilla.org/mozilla-central/rev/797ba90aed16
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: wanted1.9.1? → wanted1.9.1+
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: