[x64] Fix -Wshadow warnings in instruction-selector-x64
Bug: v8:12244,v8:12245 Change-Id: I811e50b747813f253cd3ebe0bc56d01a92532a1a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3200401 Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/main@{#77223}
This commit is contained in:
parent
eb5656ef23
commit
98a903dff9
@ -1007,15 +1007,15 @@ void InstructionSelector::VisitWord64Shl(Node* node) {
|
||||
kPositiveDisplacement);
|
||||
return;
|
||||
} else {
|
||||
Int64BinopMatcher m(node);
|
||||
if ((m.left().IsChangeInt32ToInt64() ||
|
||||
m.left().IsChangeUint32ToUint64()) &&
|
||||
m.right().IsInRange(32, 63)) {
|
||||
Int64BinopMatcher bm(node);
|
||||
if ((bm.left().IsChangeInt32ToInt64() ||
|
||||
bm.left().IsChangeUint32ToUint64()) &&
|
||||
bm.right().IsInRange(32, 63)) {
|
||||
// There's no need to sign/zero-extend to 64-bit if we shift out the upper
|
||||
// 32 bits anyway.
|
||||
Emit(kX64Shl, g.DefineSameAsFirst(node),
|
||||
g.UseRegister(m.left().node()->InputAt(0)),
|
||||
g.UseImmediate(m.right().node()));
|
||||
g.UseRegister(bm.left().node()->InputAt(0)),
|
||||
g.UseImmediate(bm.right().node()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2435,19 +2435,19 @@ void InstructionSelector::VisitWordCompareZero(Node* user, Node* value,
|
||||
Int64BinopMatcher m(value);
|
||||
if (m.right().Is(0)) {
|
||||
// Try to combine the branch with a comparison.
|
||||
Node* const user = m.node();
|
||||
Node* const value = m.left().node();
|
||||
if (CanCover(user, value)) {
|
||||
switch (value->opcode()) {
|
||||
Node* const eq_user = m.node();
|
||||
Node* const eq_value = m.left().node();
|
||||
if (CanCover(eq_user, eq_value)) {
|
||||
switch (eq_value->opcode()) {
|
||||
case IrOpcode::kInt64Sub:
|
||||
return VisitWordCompare(this, value, kX64Cmp, cont);
|
||||
return VisitWordCompare(this, eq_value, kX64Cmp, cont);
|
||||
case IrOpcode::kWord64And:
|
||||
return VisitWordCompare(this, value, kX64Test, cont);
|
||||
return VisitWordCompare(this, eq_value, kX64Test, cont);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return VisitCompareZero(this, user, value, kX64Cmp, cont);
|
||||
return VisitCompareZero(this, eq_user, eq_value, kX64Cmp, cont);
|
||||
}
|
||||
return VisitWord64EqualImpl(this, value, cont);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user