8af781ea82
Disable the propagation of truncations through Phi, Select or TypeGuard if the output representation is tagged, because when the truncations are taken we don't necessarily reflect this in the types and therefore we might end up in a situation where we produce a word32 value, the type says Number, and now we need to change that to tagged, which is not possible since we don't know how to interpret the bits, i.e. whether the value is Signed32 or Unsigned32. BUG=chromium:644048 Review-Url: https://codereview.chromium.org/2311903002 Cr-Commit-Position: refs/heads/master@{#39186}
17 lines
321 B
JavaScript
17 lines
321 B
JavaScript
// Copyright 2016 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
function foo(x) {
|
|
(x
|
|
? (!0 / 0)
|
|
: x) | 0
|
|
}
|
|
|
|
foo(1);
|
|
foo(2);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo(3);
|