Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Issue 1433353006: [machine-operator-reducer] fix float truncation (Closed)

Created:
5 years, 1 month ago by fedor.indutny
Modified:
5 years ago
Reviewers:
titzer
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[machine-operator-reducer] fix float truncation Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with `value`. Generally, `value` may have a range bigger than the one that could fit into Int32. Replace it with `TruncateInt64ToInt32(value)` instead, and only if the `value` fits into Float64 without precision loss. Add missing mjsunit test for 52bit multiplication/division optimization that has landed in refs/heads/master@{#31899}. BUG= R=titzer@google.com Committed: https://crrev.com/64efa2a904773816968992628f0bf0f1b7ae82be Cr-Commit-Position: refs/heads/master@{#32227}

Patch Set 1 #

Total comments: 4

Patch Set 2 : fixes #

Patch Set 3 : fix arguments order for assertEquals #

Patch Set 4 : arm64: do not merge 64bit shr/sar with 32bit op #

Total comments: 5

Patch Set 5 : fix #

Patch Set 6 : fix the bug in machine-operator-reducer instead of fixing arm64 #

Patch Set 7 : add test for machine-operator-reducer #

Total comments: 2

Patch Set 8 : fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -2 lines) Patch
M src/compiler/machine-operator-reducer.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -1 line 0 comments Download
A test/mjsunit/math-52-mul-div.js View 1 2 1 chunk +86 lines, -0 lines 0 comments Download
M test/unittests/compiler/machine-operator-reducer-unittest.cc View 1 2 3 4 5 6 1 chunk +22 lines, -1 line 0 comments Download

Messages

Total messages: 30 (5 generated)
fedor.indutny
5 years, 1 month ago (2015-11-11 20:47:18 UTC) #2
titzer
Thanks for writing more tests. Mostly looks good modulo small comments. https://codereview.chromium.org/1433353006/diff/1/test/mjsunit/math-52-mul-div.js File test/mjsunit/math-52-mul-div.js (right): ...
5 years, 1 month ago (2015-11-11 21:04:43 UTC) #3
fedor.indutny
All fixed. Thanks! https://codereview.chromium.org/1433353006/diff/1/test/mjsunit/math-52-mul-div.js File test/mjsunit/math-52-mul-div.js (right): https://codereview.chromium.org/1433353006/diff/1/test/mjsunit/math-52-mul-div.js#newcode1 test/mjsunit/math-52-mul-div.js:1: // Copyright 2015 the V8 project ...
5 years, 1 month ago (2015-11-11 21:35:58 UTC) #4
titzer
lgtm
5 years, 1 month ago (2015-11-11 23:03:11 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433353006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433353006/20001
5 years, 1 month ago (2015-11-11 23:03:54 UTC) #7
fedor.indutny
Looks like it does not work on arm64. Investigating.
5 years, 1 month ago (2015-11-12 02:09:13 UTC) #8
fedor.indutny
Ben, It turns out to be a bug in arm64 instruction selector. I have included ...
5 years, 1 month ago (2015-11-12 03:39:01 UTC) #9
fedor.indutny
To make it completely clear. This is what the generated arm64 code looks like before ...
5 years, 1 month ago (2015-11-12 04:14:15 UTC) #10
titzer
https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc File src/compiler/arm64/instruction-selector-arm64.cc (right): https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc#newcode153 src/compiler/arm64/instruction-selector-arm64.cc:153: bool is_word_output = !IrOpcode::Is64(node->opcode()); Can you move this condition ...
5 years, 1 month ago (2015-11-13 23:35:17 UTC) #11
fedor.indutny
https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc File src/compiler/arm64/instruction-selector-arm64.cc (right): https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc#newcode153 src/compiler/arm64/instruction-selector-arm64.cc:153: bool is_word_output = !IrOpcode::Is64(node->opcode()); On 2015/11/13 23:35:17, titzer wrote: ...
5 years, 1 month ago (2015-11-14 00:15:52 UTC) #12
fedor.indutny
Hello! Should I change the description of the CL? (Also does it LGTY?) Thanks!
5 years, 1 month ago (2015-11-16 16:47:15 UTC) #13
titzer
On 2015/11/16 16:47:15, fedor.indutny wrote: > Hello! > > Should I change the description of ...
5 years, 1 month ago (2015-11-18 08:41:34 UTC) #14
fedor.indutny
On 2015/11/18 08:41:34, titzer wrote: > On 2015/11/16 16:47:15, fedor.indutny wrote: > > Hello! > ...
5 years, 1 month ago (2015-11-18 19:37:13 UTC) #16
fedor.indutny
Ping.
5 years, 1 month ago (2015-11-23 23:55:03 UTC) #17
titzer
https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc File src/compiler/arm64/instruction-selector-arm64.cc (right): https://codereview.chromium.org/1433353006/diff/60001/src/compiler/arm64/instruction-selector-arm64.cc#newcode144 src/compiler/arm64/instruction-selector-arm64.cc:144: Node* input_node, InstructionCode* opcode, bool try_ror) { Can you ...
5 years, 1 month ago (2015-11-24 08:35:02 UTC) #18
titzer
On 2015/11/23 23:55:03, fedor.indutny wrote: > Ping. Sorry, the below comment was sitting unsent for ...
5 years, 1 month ago (2015-11-24 08:35:24 UTC) #19
fedor.indutny
Sorry, but I think your comments no longer apply. It turned out that arm code ...
5 years ago (2015-11-24 18:48:38 UTC) #20
titzer
lgtm https://codereview.chromium.org/1433353006/diff/120001/src/compiler/machine-operator-reducer.cc File src/compiler/machine-operator-reducer.cc (right): https://codereview.chromium.org/1433353006/diff/120001/src/compiler/machine-operator-reducer.cc#newcode656 src/compiler/machine-operator-reducer.cc:656: // Rounding int64 to float64 should not loose ...
5 years ago (2015-11-24 19:30:35 UTC) #21
fedor.indutny
Fixed typo. Thanks! https://codereview.chromium.org/1433353006/diff/120001/src/compiler/machine-operator-reducer.cc File src/compiler/machine-operator-reducer.cc (right): https://codereview.chromium.org/1433353006/diff/120001/src/compiler/machine-operator-reducer.cc#newcode656 src/compiler/machine-operator-reducer.cc:656: // Rounding int64 to float64 should ...
5 years ago (2015-11-24 19:33:37 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433353006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433353006/140001
5 years ago (2015-11-24 19:33:48 UTC) #25
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years ago (2015-11-24 20:25:10 UTC) #26
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/64efa2a904773816968992628f0bf0f1b7ae82be Cr-Commit-Position: refs/heads/master@{#32227}
5 years ago (2015-11-24 20:25:46 UTC) #27
fedor.indutny
Hooray, thank you!
5 years ago (2015-11-25 00:33:36 UTC) #28
Benedikt Meurer
I'm afraid but this is also unsound for the reasons outlined in https://codereview.chromium.org/1473073004/ I'll do ...
5 years ago (2015-11-26 03:58:49 UTC) #29
Benedikt Meurer
5 years ago (2015-11-26 06:11:37 UTC) #30
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1468313009/ by bmeurer@chromium.org.

The reason for reverting is: This is also unsound for the reasons outlined in
https://codereview.chromium.org/1473073004/
Will reland the mjsunit test separately and help Fedor to implement a solution
based on simplified operators..

Powered by Google App Engine
This is Rietveld 408576698