forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original commit message: Merged: [compiler] Fix bug in SimplifiedLowering's overflow computation Revision: e371325bcb03f20a362ebfa48225159702c6fde7 BUG=chromium:1126249 NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true [email protected] Change-Id: I411d9233f77992e73da12784cef59c885999b556 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2415988 Reviewed-by: Tobias Tebbi <[email protected]> Commit-Queue: Georg Neis <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{#8} Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472} Refs: v8/v8@a59e3ac
- Loading branch information
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2020 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(b) { | ||
var x = -0; | ||
var y = -0x80000000; | ||
|
||
if (b) { | ||
x = -1; | ||
y = 1; | ||
} | ||
|
||
return (x - y) == -0x80000000; | ||
} | ||
|
||
%PrepareFunctionForOptimization(foo); | ||
assertFalse(foo(true)); | ||
%OptimizeFunctionOnNextCall(foo); | ||
assertFalse(foo(false)); |