The default bug view has changed. See this FAQ.

IonMonkey: Miscompilation of 1/x.

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sstangl, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
The following code miscompiles on x64:
> function f(x) { return 1/x; }

f(3) returns 1. The MIR is correct, but the LIR contains two LInteger(1) instructions, and the generated assembly overwrites the parameter of |3| with |1|, although the regalloc does not show any intended use of that register.

Fixing this fixes SS' math-spectral-norm.
(Reporter)

Comment 1

6 years ago
Created attachment 565085 [details]
LIR

Oh, the LIR is just totally incorrect. It is explicitly calculating 1/1 (v4,v5).
(Reporter)

Comment 2

6 years ago
Created attachment 565089 [details] [diff] [review]
sup
Attachment #565089 - Flags: review?(dvander)
Comment on attachment 565089 [details] [diff] [review]
sup

nice
Attachment #565089 - Flags: review?(dvander) → review+
(Reporter)

Comment 4

6 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/86b68bdba42f
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.