Commit 98e0bcfa authored by sreten.kovacevic's avatar sreten.kovacevic Committed by Commit Bot

[Liftoff][mips] Fix cctest/test-run-wasm/RunWasmLiftoff_ExprBlock_ManualSwitch_brif

Test started failing after commit `[Liftoff] Remove Get{Unary,Binary}OpTargetRegister`.
Optimization shouldn't be done if dst == rhs in i32_set_cond instruction.
This CL fixes the issue.

Change-Id: I67cd1ca4692fcf69202ef25f7aa58756a5ddddca
Reviewed-on: https://chromium-review.googlesource.com/952963Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51806}
parent e583fc83
......@@ -431,7 +431,7 @@ void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label,
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst,
Register lhs, Register rhs) {
Label true_label;
if (dst != lhs) {
if (dst != lhs && dst != rhs) {
ori(dst, zero_reg, 0x1);
}
......@@ -443,7 +443,7 @@ void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst,
// If not true, set on 0.
TurboAssembler::mov(dst, zero_reg);
if (dst != lhs) {
if (dst != lhs && dst != rhs) {
bind(&true_label);
} else {
Label end_label;
......
......@@ -376,7 +376,7 @@ void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label,
void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst,
Register lhs, Register rhs) {
Label true_label;
if (dst != lhs) {
if (dst != lhs && dst != rhs) {
ori(dst, zero_reg, 0x1);
}
......@@ -388,7 +388,7 @@ void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst,
// If not true, set on 0.
TurboAssembler::mov(dst, zero_reg);
if (dst != lhs) {
if (dst != lhs && dst != rhs) {
bind(&true_label);
} else {
Label end_label;
......
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