Commit f93aef83 authored by Yu Yin's avatar Yu Yin Committed by Commit Bot

[instruction-selector-mips64] Add missing CanCover check

Change-Id: I2264b7850f2c091bfd28d90c5bfe36dcfe6e8a11
Reviewed-on: https://chromium-review.googlesource.com/c/1369908Reviewed-by: 's avatarPredrag Rudic <prudic@wavecomp.com>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59994}
parent 8dd8bd56
......@@ -201,6 +201,8 @@ struct ExtendingLoadMatcher {
DCHECK(m.IsWord64Sar());
if (m.left().IsLoad() && m.right().Is(32) &&
selector_->CanCover(m.node(), m.left().node())) {
DCHECK_EQ(selector_->GetEffectiveLevel(node),
selector_->GetEffectiveLevel(m.left().node()));
MachineRepresentation rep =
LoadRepresentationOf(m.left().node()->op()).representation();
DCHECK_EQ(3, ElementSizeLog2Of(rep));
......@@ -1367,7 +1369,8 @@ void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) {
if (CanCover(node, value)) {
switch (value->opcode()) {
case IrOpcode::kWord64Sar: {
if (TryEmitExtendingLoad(this, value, node)) {
if (CanCoverTransitively(node, value, value->InputAt(0)) &&
TryEmitExtendingLoad(this, value, node)) {
return;
} else {
Int64BinopMatcher m(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