| Index: runtime/vm/constant_propagator.cc
|
| diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
|
| index a1abaaded7d9d3a7295b80d34bc65707ad2cf8ff..35bab84f004618cd9382b4f49737a9d7f28caa45 100644
|
| --- a/runtime/vm/constant_propagator.cc
|
| +++ b/runtime/vm/constant_propagator.cc
|
| @@ -508,13 +508,17 @@ static bool CompareIntegers(Token::Kind kind,
|
| }
|
|
|
|
|
| +// Comparison instruction that is equivalent to the (left & right) == 0
|
| +// comparison pattern.
|
| void ConstantPropagator::VisitTestSmi(TestSmiInstr* instr) {
|
| const Object& left = instr->left()->definition()->constant_value();
|
| const Object& right = instr->right()->definition()->constant_value();
|
| if (IsNonConstant(left) || IsNonConstant(right)) {
|
| SetValue(instr, non_constant_);
|
| } else if (IsConstant(left) && IsConstant(right)) {
|
| - if (left.IsInteger() && right.IsInteger()) {
|
| + // BitOp does not work on Bigints.
|
| + if (left.IsInteger() && right.IsInteger() &&
|
| + !left.IsBigint() && !right.IsBigint()) {
|
| const bool result = CompareIntegers(
|
| instr->kind(),
|
| Integer::Handle(I, Integer::Cast(left).BitOp(Token::kBIT_AND,
|
|
|