diff --git a/runtime/tests/vm/dart/regress_55003_test.dart b/runtime/tests/vm/dart/regress_55003_test.dart new file mode 100644 index 00000000000..3fe810ef6f8 --- /dev/null +++ b/runtime/tests/vm/dart/regress_55003_test.dart @@ -0,0 +1,17 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// 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. + +int var64 = -1; +num var68 = 2; + +@pragma("vm:always-consider-inlining") +Set? foo0_1() { + return { + (8 <= (((var64 + -90) * 9223372034707292160) % var68)), + }; +} + +main() { + foo0_1(); +} diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc index d3be1c5507d..59ca02cfcae 100644 --- a/runtime/vm/compiler/backend/il.cc +++ b/runtime/vm/compiler/backend/il.cc @@ -2443,7 +2443,7 @@ Definition* BinaryIntegerOpInstr::Canonicalize(FlowGraph* flow_graph) { } else if ((rhs > 0) && Utils::IsPowerOfTwo(rhs)) { const int64_t shift_amount = Utils::ShiftForPowerOfTwo(rhs); ConstantInstr* constant_shift_amount = flow_graph->GetConstant( - Smi::Handle(Smi::New(shift_amount)), representation()); + Smi::Handle(Smi::New(shift_amount)), kTagged); BinaryIntegerOpInstr* shift = BinaryIntegerOpInstr::Make( representation(), Token::kSHL, left()->CopyWithType(), new Value(constant_shift_amount), GetDeoptId(), can_overflow(),