Commit fd9c5a78 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[turbofan] Poison according to NeedsPoisoning return value

Previously we were also taking into account the machine type

Change-Id: Ic76aad578f00ef24cf17b349d94cdade8f9ee29d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1733072Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63044}
parent d1a4706a
......@@ -567,9 +567,7 @@ void MemoryOptimizer::VisitLoadElement(Node* node,
Node* index = node->InputAt(1);
node->ReplaceInput(1, ComputeIndex(access, index));
MachineType type = access.machine_type;
if (NeedsPoisoning(access.load_sensitivity) &&
type.representation() != MachineRepresentation::kTaggedPointer &&
type.representation() != MachineRepresentation::kCompressedPointer) {
if (NeedsPoisoning(access.load_sensitivity)) {
NodeProperties::ChangeOp(node, machine()->PoisonedLoad(type));
} else {
NodeProperties::ChangeOp(node, machine()->Load(type));
......@@ -583,9 +581,7 @@ void MemoryOptimizer::VisitLoadField(Node* node, AllocationState const* state) {
Node* offset = jsgraph()->IntPtrConstant(access.offset - access.tag());
node->InsertInput(graph()->zone(), 1, offset);
MachineType type = access.machine_type;
if (NeedsPoisoning(access.load_sensitivity) &&
type.representation() != MachineRepresentation::kTaggedPointer &&
type.representation() != MachineRepresentation::kCompressedPointer) {
if (NeedsPoisoning(access.load_sensitivity)) {
NodeProperties::ChangeOp(node, machine()->PoisonedLoad(type));
} else {
NodeProperties::ChangeOp(node, machine()->Load(type));
......
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