37ab663ae5
R=jarin@google.com, tebbi@google.com Change-Id: I23b92df275ce294d62c906a0b94dcb9b15f6be39 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609803 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61472}
17 lines
434 B
JavaScript
17 lines
434 B
JavaScript
// Copyright 2019 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
|
|
|
|
// Check that constant-folding of arithmetic results in identical nodes.
|
|
(function() {
|
|
function foo(x) {
|
|
%TurbofanStaticAssert(1 * x == x + 0);
|
|
}
|
|
foo(121);
|
|
foo(122);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo(123);
|
|
})();
|