[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}
This commit is contained in:
parent
149f7f4d96
commit
c4cf2ea4fd
@ -511,12 +511,10 @@ 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);
|
||||
}
|
||||
|
||||
|
@ -736,10 +736,8 @@ 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);
|
||||
}
|
||||
}
|
||||
@ -747,10 +745,8 @@ 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);
|
||||
}
|
||||
}
|
||||
@ -802,10 +798,8 @@ 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);
|
||||
}
|
||||
}
|
||||
@ -813,10 +807,8 @@ 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user