S390 [simd][liftoff] Implement relaxed swizzle
Instruction selector is also modified to include a `relaxed` boolean value to be used for future optimizations. Change-Id: I1e314066655613846653cc0c3668167c4ef32648 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735106 Reviewed-by: Junliang Yan <junyan@redhat.com> Reviewed-by: Milad Farazmand <mfarazma@redhat.com> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#81511}
This commit is contained in:
parent
979bd521e8
commit
93f5f1a7d8
@ -2533,8 +2533,7 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
|
||||
V(I8x16AddSatS) \
|
||||
V(I8x16SubSatS) \
|
||||
V(I8x16AddSatU) \
|
||||
V(I8x16SubSatU) \
|
||||
V(I8x16Swizzle)
|
||||
V(I8x16SubSatU)
|
||||
|
||||
#define SIMD_UNOP_LIST(V) \
|
||||
V(F64x2Abs) \
|
||||
@ -2716,8 +2715,21 @@ void InstructionSelector::VisitI8x16Shuffle(Node* node) {
|
||||
g.UseImmediate(wasm::SimdShuffle::Pack4Lanes(shuffle_remapped + 8)),
|
||||
g.UseImmediate(wasm::SimdShuffle::Pack4Lanes(shuffle_remapped + 12)));
|
||||
}
|
||||
|
||||
void InstructionSelector::VisitI8x16Swizzle(Node* node) {
|
||||
S390OperandGenerator g(this);
|
||||
bool relaxed = OpParameter<bool>(node->op());
|
||||
// TODO(miladfarca): Optimize Swizzle if relaxed.
|
||||
USE(relaxed);
|
||||
|
||||
InstructionOperand temps[] = {g.TempSimd128Register()};
|
||||
Emit(kS390_I8x16Swizzle, g.DefineAsRegister(node),
|
||||
g.UseUniqueRegister(node->InputAt(0)),
|
||||
g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps);
|
||||
}
|
||||
#else
|
||||
void InstructionSelector::VisitI8x16Shuffle(Node* node) { UNREACHABLE(); }
|
||||
void InstructionSelector::VisitI8x16Swizzle(Node* node) { UNREACHABLE(); }
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
|
||||
// This is a replica of SimdShuffle::Pack4Lanes. However, above function will
|
||||
|
@ -2743,7 +2743,12 @@ void LiftoffAssembler::emit_i8x16_swizzle(LiftoffRegister dst,
|
||||
void LiftoffAssembler::emit_i8x16_relaxed_swizzle(LiftoffRegister dst,
|
||||
LiftoffRegister lhs,
|
||||
LiftoffRegister rhs) {
|
||||
bailout(kRelaxedSimd, "emit_i8x16_relaxed_swizzle");
|
||||
Simd128Register src1 = lhs.fp();
|
||||
Simd128Register src2 = rhs.fp();
|
||||
Simd128Register dest = dst.fp();
|
||||
Simd128Register temp =
|
||||
GetUnusedRegister(kFpReg, LiftoffRegList{dest, src1, src2}).fp();
|
||||
I8x16Swizzle(dest, src1, src2, r0, r1, kScratchDoubleReg, temp);
|
||||
}
|
||||
|
||||
void LiftoffAssembler::emit_i32x4_relaxed_trunc_f32x4_s(LiftoffRegister dst,
|
||||
|
Loading…
Reference in New Issue
Block a user