Commit e9c1884e authored by jiepan's avatar jiepan Committed by V8 LUCI CQ

[turbofan][x64] Use leaq for Int64Mul if possiable

Change-Id: Ic81be39ed0666c708f9129bef1e75268afc7faf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807123Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#82374}
parent 68c158ab
...@@ -1453,6 +1453,14 @@ void InstructionSelector::VisitInt32MulWithOverflow(Node* node) { ...@@ -1453,6 +1453,14 @@ void InstructionSelector::VisitInt32MulWithOverflow(Node* node) {
} }
void InstructionSelector::VisitInt64Mul(Node* node) { void InstructionSelector::VisitInt64Mul(Node* node) {
Int64ScaleMatcher m(node, true);
if (m.matches()) {
Node* index = node->InputAt(0);
Node* base = m.power_of_two_plus_one() ? index : nullptr;
EmitLea(this, kX64Lea, node, index, m.scale(), base, nullptr,
kPositiveDisplacement);
return;
}
VisitMul(this, node, kX64Imul); VisitMul(this, node, kX64Imul);
} }
......
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