Commit ac95e024 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64]delete check in F32X4MIN/MAX

Change-Id: I7419009e11d40416322abb0bec8bfacf9b5580d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162721
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: 's avatarJi Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76862}
parent 6f12d8b9
...@@ -2549,11 +2549,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2549,11 +2549,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
i.InputSimd128Register(1)); i.InputSimd128Register(1));
__ vand_vv(v0, v0, kSimd128ScratchReg); __ vand_vv(v0, v0, kSimd128ScratchReg);
__ li(kScratchReg, kNaN); __ li(kScratchReg, kNaN);
__ vmv_vx(i.OutputSimd128Register(), kScratchReg); __ vmv_vx(kSimd128ScratchReg, kScratchReg);
DCHECK_NE(i.OutputSimd128Register(), i.InputSimd128Register(1)); __ vfmax_vv(kSimd128ScratchReg, i.InputSimd128Register(1),
DCHECK_NE(i.OutputSimd128Register(), i.InputSimd128Register(0));
__ vfmax_vv(i.OutputSimd128Register(), i.InputSimd128Register(1),
i.InputSimd128Register(0), Mask); i.InputSimd128Register(0), Mask);
__ vmv_vv(i.OutputSimd128Register(), kSimd128ScratchReg);
break; break;
} }
case kRiscvF32x4Min: { case kRiscvF32x4Min: {
...@@ -2564,11 +2563,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2564,11 +2563,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
i.InputSimd128Register(1)); i.InputSimd128Register(1));
__ vand_vv(v0, v0, kSimd128ScratchReg); __ vand_vv(v0, v0, kSimd128ScratchReg);
__ li(kScratchReg, kNaN); __ li(kScratchReg, kNaN);
__ vmv_vx(i.OutputSimd128Register(), kScratchReg); __ vmv_vx(kSimd128ScratchReg, kScratchReg);
DCHECK_NE(i.OutputSimd128Register(), i.InputSimd128Register(1)); __ vfmin_vv(kSimd128ScratchReg, i.InputSimd128Register(1),
DCHECK_NE(i.OutputSimd128Register(), i.InputSimd128Register(0)); i.InputSimd128Register(0), Mask);
__ vfmin_vv(i.OutputSimd128Register(), i.InputSimd128Register(1), __ vmv_vv(i.OutputSimd128Register(), kSimd128ScratchReg);
i.InputSimd128Register(0));
break; break;
} }
default: default:
......
...@@ -2603,10 +2603,9 @@ void LiftoffAssembler::emit_f32x4_min(LiftoffRegister dst, LiftoffRegister lhs, ...@@ -2603,10 +2603,9 @@ void LiftoffAssembler::emit_f32x4_min(LiftoffRegister dst, LiftoffRegister lhs,
vmfeq_vv(kSimd128ScratchReg, rhs.fp().toV(), rhs.fp().toV()); vmfeq_vv(kSimd128ScratchReg, rhs.fp().toV(), rhs.fp().toV());
vand_vv(v0, v0, kSimd128ScratchReg); vand_vv(v0, v0, kSimd128ScratchReg);
li(kScratchReg, kNaN); li(kScratchReg, kNaN);
DCHECK_NE(dst, lhs); vmv_vx(kSimd128ScratchReg, kScratchReg);
DCHECK_NE(dst, rhs); vfmin_vv(kSimd128ScratchReg, rhs.fp().toV(), lhs.fp().toV(), Mask);
vmv_vx(dst.fp().toV(), kScratchReg); vmv_vv(dst.fp().toV(), kSimd128ScratchReg);
vfmin_vv(dst.fp().toV(), rhs.fp().toV(), lhs.fp().toV(), Mask);
} }
void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs,
...@@ -2617,10 +2616,9 @@ void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs, ...@@ -2617,10 +2616,9 @@ void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs,
vmfeq_vv(kSimd128ScratchReg, rhs.fp().toV(), rhs.fp().toV()); vmfeq_vv(kSimd128ScratchReg, rhs.fp().toV(), rhs.fp().toV());
vand_vv(v0, v0, kSimd128ScratchReg); vand_vv(v0, v0, kSimd128ScratchReg);
li(kScratchReg, kNaN); li(kScratchReg, kNaN);
DCHECK_NE(dst, lhs); vmv_vx(kSimd128ScratchReg, kScratchReg);
DCHECK_NE(dst, rhs); vfmax_vv(kSimd128ScratchReg, rhs.fp().toV(), lhs.fp().toV(), Mask);
vmv_vx(dst.fp().toV(), kScratchReg); vmv_vv(dst.fp().toV(), kSimd128ScratchReg);
vfmax_vv(dst.fp().toV(), rhs.fp().toV(), lhs.fp().toV(), Mask);
} }
void LiftoffAssembler::emit_f32x4_pmin(LiftoffRegister dst, LiftoffRegister lhs, void LiftoffAssembler::emit_f32x4_pmin(LiftoffRegister dst, LiftoffRegister lhs,
......
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