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

Issue 2662233002: [wasm] Remove x / -1 = -x constant folding for wasm (Closed)

Created:
3 years, 10 months ago by ahaas
Modified:
3 years, 10 months ago
Reviewers:
titzer
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Remove x / -1 = -x constant folding for wasm TEST=mjsunit/wasm/float-constant-folding R=titzer@chromium.org

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M test/mjsunit/wasm/float-constant-folding.js View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (16 generated)
ahaas
3 years, 10 months ago (2017-01-31 12:26:22 UTC) #1
titzer
https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc File src/compiler/machine-operator-reducer.cc (right): https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc#newcode440 src/compiler/machine-operator-reducer.cc:440: if (!wasm_origin_ && m.right().Is(-1)) { // x / -1.0 ...
3 years, 10 months ago (2017-01-31 17:24:49 UTC) #6
ahaas
https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc File src/compiler/machine-operator-reducer.cc (right): https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc#newcode440 src/compiler/machine-operator-reducer.cc:440: if (!wasm_origin_ && m.right().Is(-1)) { // x / -1.0 ...
3 years, 10 months ago (2017-01-31 19:43:37 UTC) #11
ahaas
On 2017/01/31 at 19:43:37, ahaas wrote: > https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc > File src/compiler/machine-operator-reducer.cc (right): > > https://codereview.chromium.org/2662233002/diff/1/src/compiler/machine-operator-reducer.cc#newcode440 ...
3 years, 10 months ago (2017-02-02 08:11:14 UTC) #16
titzer
lgtm
3 years, 10 months ago (2017-02-02 17:35:11 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2662233002/40001
3 years, 10 months ago (2017-02-03 09:23:15 UTC) #19
commit-bot: I haz the power
Failed to apply patch for src/compiler/machine-operator-reducer.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-03 09:48:16 UTC) #21
ahaas
3 years, 10 months ago (2017-02-03 11:36:11 UTC) #24
Message was sent while issue was closed.
On 2017/02/03 at 09:48:16, commit-bot wrote:
> Failed to apply patch for src/compiler/machine-operator-reducer.cc:
> While running git apply --index -p1;
>   error: patch failed: src/compiler/machine-operator-reducer.cc:437
>   error: src/compiler/machine-operator-reducer.cc: patch does not apply
> 
> Patch:       src/compiler/machine-operator-reducer.cc
> Index: src/compiler/machine-operator-reducer.cc
> diff --git a/src/compiler/machine-operator-reducer.cc
b/src/compiler/machine-operator-reducer.cc
> index
f7fe19d494cc3aafdfcc0117053434e649521d33..e59fe0775573f60fe7695368b20d8b9b6ed669b6
100644
> --- a/src/compiler/machine-operator-reducer.cc
> +++ b/src/compiler/machine-operator-reducer.cc
> @@ -437,7 +437,7 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
>        if (m.IsFoldable()) {  // K / K => K
>          return ReplaceFloat64(m.left().Value() / m.right().Value());
>        }
> -      if (m.right().Is(-1)) {  // x / -1.0 => -x
> +      if (allow_signalling_nan_ && m.right().Is(-1)) {  // x / -1.0 => -x
>          node->RemoveInput(1);
>          NodeProperties::ChangeOp(node, machine()->Float64Neg());
>          return Changed(node);

Seems like I made a mistake with rebasing and committed this CL as part of
another CL. Sorry.

Powered by Google App Engine
This is Rietveld 408576698