[wasm][turbofan] Do not propagate signalling NaN
When optimizing wasm code with MachineOperatorReducer, the {allow_signalling_nan} flag should be off, as all wasm floating point operations are specified to return quiet NaN. Change-Id: I54c0bb1dfaec645ae2031f4448de5daa6dc55301 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026063 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/main@{#84267}
This commit is contained in:
parent
cd5322de13
commit
6578f7fc29
@ -2014,12 +2014,13 @@ struct LateOptimizationPhase {
|
||||
struct MachineOperatorOptimizationPhase {
|
||||
DECL_PIPELINE_PHASE_CONSTANTS(MachineOperatorOptimization)
|
||||
|
||||
void Run(PipelineData* data, Zone* temp_zone) {
|
||||
void Run(PipelineData* data, Zone* temp_zone, bool allow_signalling_nan) {
|
||||
GraphReducer graph_reducer(
|
||||
temp_zone, data->graph(), &data->info()->tick_counter(), data->broker(),
|
||||
data->jsgraph()->Dead(), data->observe_node_manager());
|
||||
ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone());
|
||||
MachineOperatorReducer machine_reducer(&graph_reducer, data->jsgraph());
|
||||
MachineOperatorReducer machine_reducer(&graph_reducer, data->jsgraph(),
|
||||
allow_signalling_nan);
|
||||
|
||||
AddReducer(data, &graph_reducer, &machine_reducer);
|
||||
AddReducer(data, &graph_reducer, &value_numbering);
|
||||
@ -3014,7 +3015,7 @@ bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
|
||||
// Run value numbering and machine operator reducer to optimize load/store
|
||||
// address computation (in particular, reuse the address computation
|
||||
// whenever possible).
|
||||
Run<MachineOperatorOptimizationPhase>();
|
||||
Run<MachineOperatorOptimizationPhase>(true);
|
||||
RunPrintAndVerify(MachineOperatorOptimizationPhase::phase_name(), true);
|
||||
|
||||
Run<DecompressionOptimizationPhase>();
|
||||
@ -3443,7 +3444,7 @@ void Pipeline::GenerateCodeForWasmFunction(
|
||||
// Run value numbering and machine operator reducer to optimize load/store
|
||||
// address computation (in particular, reuse the address computation
|
||||
// whenever possible).
|
||||
pipeline.Run<MachineOperatorOptimizationPhase>();
|
||||
pipeline.Run<MachineOperatorOptimizationPhase>(is_asm_js);
|
||||
pipeline.RunPrintAndVerify(MachineOperatorOptimizationPhase::phase_name(),
|
||||
true);
|
||||
if (!v8_flags.turboshaft_wasm) {
|
||||
|
Loading…
Reference in New Issue
Block a user