Commit c69440b5 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC: Use xvmindp to turn any selected SNANs to QNANs

f64x2min/max need to canonicalize the output only if both
inputs are also canonicalized, otherwise any arithmetic NaN
(from either lane) can be placed into the result register.

We also need to make sure the output value is a QNAN.

Change-Id: I363f88528674014cd92828d429a61442406025b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2573484Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71614}
parent d25be6eb
......@@ -3335,7 +3335,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ xvcmpeqdp(tempFPReg1, i.InputSimd128Register(1), \
i.InputSimd128Register(1)); \
__ vsel(i.OutputSimd128Register(), i.InputSimd128Register(1), result, \
tempFPReg1);
tempFPReg1); \
/* Use xvmindp to turn any selected SNANs to QNANs. */ \
__ xvmindp(i.OutputSimd128Register(), i.OutputSimd128Register(), \
i.OutputSimd128Register());
case kPPC_F64x2Min: {
__ xvmindp(kScratchDoubleReg, i.InputSimd128Register(0),
i.InputSimd128Register(1));
......
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