[turbofan] Handle Smi -> Float32 conversion in representation changer.
BUG=chromium:693425 Review-Url: https://codereview.chromium.org/2749193003 Cr-Commit-Position: refs/heads/master@{#43811}
This commit is contained in:
parent
be6b9f9204
commit
8c114d1737
@ -498,8 +498,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
|
||||
node = jsgraph()->graph()->NewNode(op, node);
|
||||
op = machine()->TruncateFloat64ToFloat32();
|
||||
}
|
||||
} else if (output_rep == MachineRepresentation::kTagged ||
|
||||
output_rep == MachineRepresentation::kTaggedPointer) {
|
||||
} else if (IsAnyTagged(output_rep)) {
|
||||
if (output_type->Is(Type::NumberOrOddball())) {
|
||||
// tagged -> float64 -> float32
|
||||
if (output_type->Is(Type::Number())) {
|
||||
|
11
test/mjsunit/compiler/regress-693425.js
Normal file
11
test/mjsunit/compiler/regress-693425.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var g = 0;
|
||||
g++;
|
||||
var f32 = new Float32Array();
|
||||
function foo() {
|
||||
f32[0 >> 2] = g;
|
||||
}
|
||||
foo();
|
Loading…
Reference in New Issue
Block a user