Commit 0b3fe3ad authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[liftoff] Avoid addition with 0

A simple fix to avoid an unneeded instruction.

R=ahaas@chromium.org

Bug: chromium:1152363
Change-Id: I7188156816ab24ed88fb1cd79859aa9f0b6c948b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2557513Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71367}
parent 1449f0b1
......@@ -2248,7 +2248,7 @@ class LiftoffCompiler {
Register tmp = __ GetUnusedRegister(kGpReg, *pinned).gp();
// TODO(clemensb): Use 64-bit operations if memory64 is used.
DCHECK_GE(kMaxUInt32, *offset);
__ emit_i32_addi(index, index, static_cast<uint32_t>(*offset));
if (*offset) __ emit_i32_addi(index, index, static_cast<uint32_t>(*offset));
LOAD_INSTANCE_FIELD(tmp, MemoryMask, kSystemPointerSize);
__ emit_i32_and(index, index, tmp);
*offset = 0;
......
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