Commit 8ff93b6d authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Always silence NaNs when storing to a double array.

Review-Url: https://codereview.chromium.org/2110343003
Cr-Commit-Position: refs/heads/master@{#37588}
parent 3486bbc2
...@@ -776,11 +776,9 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess( ...@@ -776,11 +776,9 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
} else if (IsFastDoubleElementsKind(elements_kind)) { } else if (IsFastDoubleElementsKind(elements_kind)) {
this_value = this_effect = graph()->NewNode( this_value = this_effect = graph()->NewNode(
simplified()->CheckNumber(), this_value, this_effect, this_control); simplified()->CheckNumber(), this_value, this_effect, this_control);
// Make sure we do not store signalling NaNs into holey double arrays. // Make sure we do not store signalling NaNs into double arrays.
if (elements_kind == FAST_HOLEY_DOUBLE_ELEMENTS) { this_value =
this_value = graph()->NewNode(simplified()->NumberSilenceNaN(), this_value);
graph()->NewNode(simplified()->NumberSilenceNaN(), this_value);
}
} }
this_effect = graph()->NewNode(simplified()->StoreElement(element_access), this_effect = graph()->NewNode(simplified()->StoreElement(element_access),
this_elements, this_index, this_value, this_elements, this_index, this_value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment