Commit e29acc3b authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[wasm-simd][ia32] Merge SSE/AVX I16x8 Eq GtS

Merge the SSE and AVX opcodes for I16x8Eq and I16x8GtS. We delegate to
the macro-assembler to check for AVX.

No functionality change is expected.

Bug: v8:11217
Change-Id: I873b261d6f949bfc6755fe4c0e09b964a02c3684
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131371
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76737}
parent 449ec959
...@@ -259,6 +259,7 @@ class V8_EXPORT_PRIVATE SharedTurboAssembler : public TurboAssemblerBase { ...@@ -259,6 +259,7 @@ class V8_EXPORT_PRIVATE SharedTurboAssembler : public TurboAssemblerBase {
AVX_OP(Pavgw, pavgw) AVX_OP(Pavgw, pavgw)
AVX_OP(Pcmpgtb, pcmpgtb) AVX_OP(Pcmpgtb, pcmpgtb)
AVX_OP(Pcmpgtd, pcmpgtd) AVX_OP(Pcmpgtd, pcmpgtd)
AVX_OP(Pcmpgtw, pcmpgtw)
AVX_OP(Pcmpeqd, pcmpeqd) AVX_OP(Pcmpeqd, pcmpeqd)
AVX_OP(Pcmpeqw, pcmpeqw) AVX_OP(Pcmpeqw, pcmpeqw)
AVX_OP(Pinsrw, pinsrw) AVX_OP(Pinsrw, pinsrw)
......
...@@ -2645,15 +2645,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2645,15 +2645,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
i.InputOperand(1)); i.InputOperand(1));
break; break;
} }
case kSSEI16x8Eq: { case kIA32I16x8Eq: {
DCHECK_EQ(i.OutputSimd128Register(), i.InputSimd128Register(0)); __ Pcmpeqw(i.OutputSimd128Register(), i.InputSimd128Register(0),
__ pcmpeqw(i.OutputSimd128Register(), i.InputOperand(1)); i.InputOperand(1));
break;
}
case kAVXI16x8Eq: {
CpuFeatureScope avx_scope(tasm(), AVX);
__ vpcmpeqw(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputOperand(1));
break; break;
} }
case kSSEI16x8Ne: { case kSSEI16x8Ne: {
...@@ -2672,15 +2666,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -2672,15 +2666,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
kScratchDoubleReg); kScratchDoubleReg);
break; break;
} }
case kSSEI16x8GtS: { case kIA32I16x8GtS: {
DCHECK_EQ(i.OutputSimd128Register(), i.InputSimd128Register(0)); __ Pcmpgtw(i.OutputSimd128Register(), i.InputSimd128Register(0),
__ pcmpgtw(i.OutputSimd128Register(), i.InputOperand(1)); i.InputOperand(1));
break;
}
case kAVXI16x8GtS: {
CpuFeatureScope avx_scope(tasm(), AVX);
__ vpcmpgtw(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputOperand(1));
break; break;
} }
case kSSEI16x8GeS: { case kSSEI16x8GeS: {
......
...@@ -227,12 +227,10 @@ namespace compiler { ...@@ -227,12 +227,10 @@ namespace compiler {
V(IA32I16x8Mul) \ V(IA32I16x8Mul) \
V(IA32I16x8MinS) \ V(IA32I16x8MinS) \
V(IA32I16x8MaxS) \ V(IA32I16x8MaxS) \
V(SSEI16x8Eq) \ V(IA32I16x8Eq) \
V(AVXI16x8Eq) \
V(SSEI16x8Ne) \ V(SSEI16x8Ne) \
V(AVXI16x8Ne) \ V(AVXI16x8Ne) \
V(SSEI16x8GtS) \ V(IA32I16x8GtS) \
V(AVXI16x8GtS) \
V(SSEI16x8GeS) \ V(SSEI16x8GeS) \
V(AVXI16x8GeS) \ V(AVXI16x8GeS) \
V(IA32I16x8UConvertI8x16Low) \ V(IA32I16x8UConvertI8x16Low) \
......
...@@ -212,12 +212,10 @@ int InstructionScheduler::GetTargetInstructionFlags( ...@@ -212,12 +212,10 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kIA32I16x8Mul: case kIA32I16x8Mul:
case kIA32I16x8MinS: case kIA32I16x8MinS:
case kIA32I16x8MaxS: case kIA32I16x8MaxS:
case kSSEI16x8Eq: case kIA32I16x8Eq:
case kAVXI16x8Eq:
case kSSEI16x8Ne: case kSSEI16x8Ne:
case kAVXI16x8Ne: case kAVXI16x8Ne:
case kSSEI16x8GtS: case kIA32I16x8GtS:
case kAVXI16x8GtS:
case kSSEI16x8GeS: case kSSEI16x8GeS:
case kAVXI16x8GeS: case kAVXI16x8GeS:
case kIA32I16x8UConvertI8x16Low: case kIA32I16x8UConvertI8x16Low:
......
...@@ -2251,9 +2251,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { ...@@ -2251,9 +2251,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) {
V(F32x4Max) \ V(F32x4Max) \
V(I32x4GtU) \ V(I32x4GtU) \
V(I32x4GeU) \ V(I32x4GeU) \
V(I16x8Eq) \
V(I16x8Ne) \ V(I16x8Ne) \
V(I16x8GtS) \
V(I16x8GeS) \ V(I16x8GeS) \
V(I16x8GtU) \ V(I16x8GtU) \
V(I16x8GeU) \ V(I16x8GeU) \
...@@ -2292,6 +2290,8 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { ...@@ -2292,6 +2290,8 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) {
V(I16x8Sub) \ V(I16x8Sub) \
V(I16x8SubSatS) \ V(I16x8SubSatS) \
V(I16x8Mul) \ V(I16x8Mul) \
V(I16x8Eq) \
V(I16x8GtS) \
V(I16x8MinS) \ V(I16x8MinS) \
V(I16x8MaxS) \ V(I16x8MaxS) \
V(I16x8AddSatU) \ V(I16x8AddSatU) \
......
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