Closed Bug 916539 Opened 6 years ago Closed 6 years ago

ARM: integer multiplication by a constant negative power of two is incorrectly optimized to a shift operation.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla27
Tracking Status
firefox25 --- fixed
firefox26 --- fixed
firefox27 --- fixed

People

(Reporter: dougc, Assigned: dougc)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

CodeGeneratorARM::visitMulI optimizes integer multiplication by a
power of two to a shift operation, however this would seem to be
only valid for multiplication by a positive constant.
There is already a jit-test failure caused by this.
Attachment #805003 - Flags: review?(mrosenberg)
Attachment #805003 - Flags: review?(mrosenberg) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f0cc00e701d7
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment on attachment 805003 [details] [diff] [review]
Guard against using optimizing to a shift operation for a negative constant

[Approval Request Comment]
Bug caused by (feature/regressing bug #): caught by a jit-test failure
User impact if declined: numerical errors in ARM compiled code
Testing completed (on m-c, etc.): fixed the failing jit-test
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch:
Attachment #805003 - Flags: approval-mozilla-aurora?
Comment on attachment 805003 [details] [diff] [review]
Guard against using optimizing to a shift operation for a negative constant

[Approval Request Comment]
Bug caused by (feature/regressing bug #): caught by a jit-test failure on m-c
User impact if declined: numerical errors in Ion ARM compiled code
Testing completed (on m-c, etc.): fixed the failing jit-test
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch:
Attachment #805003 - Flags: approval-mozilla-beta?
Attachment #805003 - Flags: approval-mozilla-beta?
Attachment #805003 - Flags: approval-mozilla-beta+
Attachment #805003 - Flags: approval-mozilla-aurora?
Attachment #805003 - Flags: approval-mozilla-aurora+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.