Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: test/mjsunit/regress/regress-5286.js

Issue 2243803002: [turbofan] Fix CheckedInt32Mod lowering for -0 case with negative left hand side. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 (function() {
8 function foo(x, y) { return x % y; }
9
10 assertEquals(0, foo(2, 2));
11 assertEquals(0, foo(4, 4));
12 %OptimizeFunctionOnNextCall(foo);
13 assertEquals(-0, foo(-8, 8));
14 })();
15
16 (function() {
17 function foo(x, y) { return x % y; }
18
19 assertEquals(0, foo(1, 1));
20 assertEquals(0, foo(2, 2));
21 %OptimizeFunctionOnNextCall(foo);
22 assertEquals(-0, foo(-3, 3));
23 })();
24
25 (function() {
26 function foo(x, y) { return x % y; }
27
28 assertEquals(0, foo(1, 1));
29 assertEquals(0, foo(2, 2));
30 %OptimizeFunctionOnNextCall(foo);
31 assertEquals(-0, foo(-2147483648, -1));
32 })();
33
34 (function() {
35 function foo(x, y) { return x % y; }
36
37 assertEquals(0, foo(1, 1));
38 assertEquals(0, foo(2, 2));
39 %OptimizeFunctionOnNextCall(foo);
40 assertEquals(-0, foo(-2147483648, -2147483648));
41 })();
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698