Commit ef68870f authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[liftoff] Merge i32.eqz + if

We currently merge i32 binary operations with a subsequent if or br_if,
and we merge i32.eqz with a subsequent br_if. The combination i32.eqz +
if was missing, even thought there is already support for that in the
"if" handler.

R=ahaas@chromium.org

Change-Id: Id4386d0c5d6dcf3605c72ea1146169d2088abe98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2996196Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75477}
parent 071a1acf
......@@ -1611,7 +1611,9 @@ class LiftoffCompiler {
kNoTrap)
case kExprI32Eqz:
DCHECK(decoder->lookahead(0, kExprI32Eqz));
if (decoder->lookahead(1, kExprBrIf) && !for_debugging_) {
if ((decoder->lookahead(1, kExprBrIf) ||
decoder->lookahead(1, kExprIf)) &&
!for_debugging_) {
DCHECK(!has_outstanding_op());
outstanding_op_ = kExprI32Eqz;
break;
......
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