[fastcall] Fixed missing representation in GetProjectionType

Bug: chromium:1399490
Change-Id: I01adc3dd8da7ce3e544ca6507172d036b10c0861
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4197351
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85545}
This commit is contained in:
Maya Lekova 2023-01-30 14:24:25 +01:00 committed by V8 LUCI CQ
parent 823433c24b
commit ef3a00533f
2 changed files with 25 additions and 0 deletions

View File

@ -328,6 +328,7 @@ MachineRepresentation NodeProperties::GetProjectionType(
: MachineRepresentation::kBit;
case IrOpcode::kTryTruncateFloat32ToInt64:
case IrOpcode::kTryTruncateFloat64ToInt64:
case IrOpcode::kTryTruncateFloat64ToUint64:
case IrOpcode::kTryTruncateFloat32ToUint64:
CHECK_LE(index, static_cast<size_t>(1));
return index == 0 ? MachineRepresentation::kWord64

View File

@ -0,0 +1,24 @@
// Copyright 2023 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turboshaft
// Flags: --stress-concurrent-inlining --expose-fast-api
const fast_c_api = new d8.test.FastCAPI();
function foo() {
fast_c_api.enforce_range_compare_u64(undefined, "", "/0/");
}
%PrepareFunctionForOptimization(foo);
try {
foo();
} catch {
}
%OptimizeFunctionOnNextCall(foo);
try {
foo();
} catch {
}