| Index: tests/language/bit_operations_test.dart
|
| diff --git a/tests/language/bit_operations_test.dart b/tests/language/bit_operations_test.dart
|
| index 0d3eece04bde8d098e2989f61d4870713d0eebb3..3c2dc93415f60c02912fa6598b6ef405016904c0 100644
|
| --- a/tests/language/bit_operations_test.dart
|
| +++ b/tests/language/bit_operations_test.dart
|
| @@ -2,10 +2,12 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
| // Dart test for testing bitwise operations.
|
| -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
|
| +// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation --enable-inlining-annotations
|
|
|
| import "package:expect/expect.dart";
|
|
|
| +const neverInline = "NeverInline";
|
| +
|
| void main() {
|
| for (int i = 0; i < 4; i++) {
|
| test();
|
| @@ -70,6 +72,9 @@ void test() {
|
| testPrecedence(4, 5, 3, 1);
|
| testPrecedence(3, 4, 5, 9);
|
| testPrecedence(0x5c71, 0x6b92, 0x7654, 0x7d28);
|
| +
|
| + // Test more special cases.
|
| + testRightShift65();
|
| }
|
|
|
| void testCornerCasesRightShifts() {
|
| @@ -198,3 +203,16 @@ void testPrecedence(int a, int b, int c, int d) {
|
| Expect.equals((a & (b << c)) ^ d, a & b << c ^ d);
|
| Expect.notEquals((a & b) << (c ^ d), a & b << c ^ d);
|
| }
|
| +
|
| +@neverInline
|
| +rightShift65Noinline(a) => a >> 65;
|
| +
|
| +testRightShift65() {
|
| + var a = 0x5f22334455667788;
|
| + var b = -0x5f22334455667788;
|
| +
|
| + for (var i = 0; i < 20; ++i) {
|
| + Expect.equals(0, rightShift65Noinline(a));
|
| + Expect.equals(-1, rightShift65Noinline(b));
|
| + }
|
| +}
|
|
|