[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/952963 Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com> Cr-Commit-Position: refs/heads/master@{#51806}
This commit is contained in:
parent
e583fc836b
commit
98e0bcfae2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user