[wasm-simd][ia32][x64] Optimize i64x2.extend_high_i32x4_{s,u}
- Use movhlps instead of pshufd if dst == src - use xorps with punpckhdq instead of two shuffles Bug: v8:11470 Change-Id: I50f77b8591372cccca48b9a6078fc3132fe48a2f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773902 Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#73527}
This commit is contained in:
parent
b1c09571cc
commit
2969e67e3c
@ -799,7 +799,11 @@ void TurboAssembler::I64x2SConvertI32x4High(XMMRegister dst, XMMRegister src) {
|
|||||||
vpmovsxdq(dst, dst);
|
vpmovsxdq(dst, dst);
|
||||||
} else {
|
} else {
|
||||||
CpuFeatureScope sse_scope(this, SSE4_1);
|
CpuFeatureScope sse_scope(this, SSE4_1);
|
||||||
|
if (dst == src) {
|
||||||
|
movhlps(dst, src);
|
||||||
|
} else {
|
||||||
pshufd(dst, src, 0xEE);
|
pshufd(dst, src, 0xEE);
|
||||||
|
}
|
||||||
pmovsxdq(dst, dst);
|
pmovsxdq(dst, dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -811,9 +815,11 @@ void TurboAssembler::I64x2UConvertI32x4High(XMMRegister dst, XMMRegister src,
|
|||||||
vpxor(scratch, scratch, scratch);
|
vpxor(scratch, scratch, scratch);
|
||||||
vpunpckhdq(dst, src, scratch);
|
vpunpckhdq(dst, src, scratch);
|
||||||
} else {
|
} else {
|
||||||
CpuFeatureScope sse_scope(this, SSE4_1);
|
if (dst != src) {
|
||||||
pshufd(dst, src, 0xEE);
|
movaps(dst, src);
|
||||||
pmovzxdq(dst, dst);
|
}
|
||||||
|
xorps(scratch, scratch);
|
||||||
|
punpckhdq(dst, scratch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2227,7 +2227,11 @@ void TurboAssembler::I64x2SConvertI32x4High(XMMRegister dst, XMMRegister src) {
|
|||||||
vpmovsxdq(dst, dst);
|
vpmovsxdq(dst, dst);
|
||||||
} else {
|
} else {
|
||||||
CpuFeatureScope sse_scope(this, SSE4_1);
|
CpuFeatureScope sse_scope(this, SSE4_1);
|
||||||
|
if (dst == src) {
|
||||||
|
movhlps(dst, src);
|
||||||
|
} else {
|
||||||
pshufd(dst, src, 0xEE);
|
pshufd(dst, src, 0xEE);
|
||||||
|
}
|
||||||
pmovsxdq(dst, dst);
|
pmovsxdq(dst, dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2238,9 +2242,11 @@ void TurboAssembler::I64x2UConvertI32x4High(XMMRegister dst, XMMRegister src) {
|
|||||||
vpxor(kScratchDoubleReg, kScratchDoubleReg, kScratchDoubleReg);
|
vpxor(kScratchDoubleReg, kScratchDoubleReg, kScratchDoubleReg);
|
||||||
vpunpckhdq(dst, src, kScratchDoubleReg);
|
vpunpckhdq(dst, src, kScratchDoubleReg);
|
||||||
} else {
|
} else {
|
||||||
CpuFeatureScope sse_scope(this, SSE4_1);
|
if (dst != src) {
|
||||||
pshufd(dst, src, 0xEE);
|
movaps(dst, src);
|
||||||
pmovzxdq(dst, dst);
|
}
|
||||||
|
xorps(kScratchDoubleReg, kScratchDoubleReg);
|
||||||
|
punpckhdq(dst, kScratchDoubleReg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user