[vm] Don't create UnboxedConstantInstr(kUnboxedInt64) for RISCV32.

TEST=dartfuzz
Bug: https://github.com/dart-lang/sdk/issues/54425
Bug: https://github.com/dart-lang/sdk/issues/54434
Change-Id: I05975376cd61ffeceda60edf76df182fbf753593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345348
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Ryan Macnak 2024-01-09 20:44:38 +00:00 committed by Commit Queue
parent e9f51b8534
commit 2ff30ee836
3 changed files with 5 additions and 5 deletions

View file

@ -402,7 +402,7 @@ Definition* AotCallSpecializer::TryOptimizeDivisionOperation(
Value* right_value) {
auto unboxed_constant = [&](int64_t value) -> Definition* {
ASSERT(compiler::target::IsSmi(value));
#if defined(TARGET_ARCH_ARM)
#if defined(TARGET_ARCH_IS_32_BIT)
Definition* const const_def = new (Z) UnboxedConstantInstr(
Smi::ZoneHandle(Z, Smi::New(value)), kUnboxedInt32);
InsertBefore(instr, const_def, /*env=*/nullptr, FlowGraph::kValue);

View file

@ -44,6 +44,8 @@ LocationSummary* Instruction::MakeCallSummary(Zone* zone,
const auto representation = instr->representation();
switch (representation) {
case kTagged:
case kUnboxedUint32:
case kUnboxedInt32:
result->set_out(
0, Location::RegisterLocation(CallingConventions::kReturnReg));
break;

View file

@ -25,13 +25,11 @@ application_snapshot("generate_dartdev_snapshot") {
deps = [
"../dds:dds",
"../dtd:dtd"
"../dtd:dtd",
]
# DDS should be run from AOT snapshot on all architectures except IA32/X86.
# TODO(https://dartbug.com/54434): Fix simriscv32 AOT.
if (dart_target_arch != "ia32" && dart_target_arch != "x86" &&
dart_target_arch != "riscv32") {
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
deps += [ "../dds:dds_aot" ]
}