v8/test/mjsunit/regress/regress-895691.js
Georg Neis a8cb521a58 [turbofan] Allow converting word64 to float32 if value is safe integer.
Bug: v8:895691
Change-Id: Ic92cb250555d097b01f894b4b7b9ae5b2eea6668
Reviewed-on: https://chromium-review.googlesource.com/c/1282990
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56691}
2018-10-16 11:31:39 +00:00

19 lines
370 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
const n = 2**32;
const x = new Float32Array();
function f() {
for (var i = 96; i < 100; i += 4) {
x[i] = i + n;
}
}
f();
%OptimizeFunctionOnNextCall(f);
f();