v8/test/mjsunit/regress/regress-901798.js
Sigurd Schneider 201a0c67b8 [turbofan] Don't loose checked Uint32 -> Int32 conversion
Bug: chromium:901798
Change-Id: I4b479d6431cc7cdfa53f9cdf6283d2ff86e32821
Reviewed-on: https://chromium-review.googlesource.com/c/1319760
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57285}
2018-11-06 15:16:48 +00:00

15 lines
368 B
JavaScript

// Copyright 2018 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 f(a) {
return (a >>> 1073741824) + -3;
}
assertEquals(-3, f(0));
assertEquals(-2, f(1));
%OptimizeFunctionOnNextCall(f);
assertEquals(4294967291, f(-2));