[ic] Don't allow hole to undefined conversions for double arrays

This CL fixes a perf regression caused by:
https://chromium-review.googlesource.com/c/v8/v8/+/1465182

A deopt loop was occurring for HOLEY_DOUBLE_ELEMENTS arrays when hole
elements were used as anything other than a float64, such as a return
value or storing into a non-double array.

bug: chromium:932082
Change-Id: I27290e9669d80050027e76cb62b0f67b51788d0f
Reviewed-on: https://chromium-review.googlesource.com/c/1474560
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Matt Gardner <magardn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#59639}
This commit is contained in:
Matt Gardner 2019-02-14 17:42:32 -08:00 committed by Commit Bot
parent 9bf0c69674
commit 3d38c4fa88

View File

@ -1154,7 +1154,8 @@ Handle<Object> KeyedLoadIC::LoadElementHandler(Handle<Map> receiver_map,
DCHECK(IsFastElementsKind(elements_kind) ||
IsFixedTypedArrayElementsKind(elements_kind));
bool convert_hole_to_undefined =
IsHoleyElementsKind(elements_kind) &&
(elements_kind == HOLEY_SMI_ELEMENTS ||
elements_kind == HOLEY_ELEMENTS) &&
AllowConvertHoleElementToUndefined(isolate(), receiver_map);
TRACE_HANDLER_STATS(isolate(), KeyedLoadIC_LoadElementDH);
return LoadHandler::LoadElement(isolate(), elements_kind,