Revert "[codegen] Remove redundant xorpd instructions"

This reverts commit c4cf2ea4fd.

Reason for revert: Seems to cause more regressions than improvement. Let's see what the perf bots say about the revert.

Original change's description:
> [codegen] Remove redundant xorpd instructions
> 
> It seems like they were originally added in https://crrev.com/23654026
> (Sep 2013) to break dependences in the OOO pipeline. This code pattern
> was then later copied for other instructions too
> (https://crrev.com/1424333002).
> The reason for the xorpd is not mentioned in the code though, and I
> found no other compiler doing this. So maybe it's obsolete by now, and
> only increases code size.
> 
> Let's remove them and see if we get any performance regressions.
> 
> R=​ahaas@chromium.org
> CC=​yangguo@chromium.org
> 
> Change-Id: I0e6d65afa67f0ee286e5b0ba95c91092c5261c8f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1926427
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65077}

TBR=yangguo@chromium.org,ahaas@chromium.org,clemensb@chromium.org

Bug: chromium:1027876, chromium:1027449
Change-Id: I533729722e294dbe567222b1c4084df6b864d2ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958053
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65388}
This commit is contained in:
Clemens Backes 2019-12-09 12:16:49 +00:00 committed by Commit Bot
parent d4a4d28552
commit 36f159b3ab
2 changed files with 10 additions and 0 deletions

View File

@ -511,10 +511,12 @@ void MacroAssembler::MaybeDropFrames() {
}
void TurboAssembler::Cvtsi2ss(XMMRegister dst, Operand src) {
xorps(dst, dst);
cvtsi2ss(dst, src);
}
void TurboAssembler::Cvtsi2sd(XMMRegister dst, Operand src) {
xorpd(dst, dst);
cvtsi2sd(dst, src);
}

View File

@ -726,8 +726,10 @@ void TurboAssembler::Cvtsd2ss(XMMRegister dst, Operand src) {
void TurboAssembler::Cvtlsi2sd(XMMRegister dst, Register src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vxorpd(dst, dst, dst);
vcvtlsi2sd(dst, dst, src);
} else {
xorpd(dst, dst);
cvtlsi2sd(dst, src);
}
}
@ -735,8 +737,10 @@ void TurboAssembler::Cvtlsi2sd(XMMRegister dst, Register src) {
void TurboAssembler::Cvtlsi2sd(XMMRegister dst, Operand src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vxorpd(dst, dst, dst);
vcvtlsi2sd(dst, dst, src);
} else {
xorpd(dst, dst);
cvtlsi2sd(dst, src);
}
}
@ -788,8 +792,10 @@ void TurboAssembler::Cvtqsi2ss(XMMRegister dst, Operand src) {
void TurboAssembler::Cvtqsi2sd(XMMRegister dst, Register src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vxorpd(dst, dst, dst);
vcvtqsi2sd(dst, dst, src);
} else {
xorpd(dst, dst);
cvtqsi2sd(dst, src);
}
}
@ -797,8 +803,10 @@ void TurboAssembler::Cvtqsi2sd(XMMRegister dst, Register src) {
void TurboAssembler::Cvtqsi2sd(XMMRegister dst, Operand src) {
if (CpuFeatures::IsSupported(AVX)) {
CpuFeatureScope scope(this, AVX);
vxorpd(dst, dst, dst);
vcvtqsi2sd(dst, dst, src);
} else {
xorpd(dst, dst);
cvtqsi2sd(dst, src);
}
}