зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1799014 - Fix f64x2./f32x4.max for AVX cpus. r=rhunt
Addresses wrong refactoring/optimization of the minMaxFloat32x4AVX and minMaxFloat64x2AVX functions. Testing of this case is covered by spec tests. (Also to be addressed in bug 1797194) Differential Revision: https://phabricator.services.mozilla.com/D161335
This commit is contained in:
Родитель
55f688a489
Коммит
cc1e25a8e3
|
@ -936,11 +936,12 @@ void MacroAssemblerX86Shared::minMaxFloat32x4AVX(bool isMin, FloatRegister lhs,
|
|||
if (isMin) {
|
||||
vminps(Operand(rhs), lhs, temp2); // min lhs, rhs
|
||||
vminps(Operand(lhs), rhs, temp1); // min rhs, lhs
|
||||
vorps(temp1, temp2, output); // fix min(-0, 0) with OR
|
||||
} else {
|
||||
vmaxps(Operand(rhs), lhs, temp2); // max lhs, rhs
|
||||
vmaxps(Operand(lhs), rhs, temp1); // max rhs, lhs
|
||||
vandps(temp1, temp2, output); // fix max(-0, 0) with AND
|
||||
}
|
||||
vorps(temp1, temp2, output); // fix min(-0, 0) with OR
|
||||
vcmpunordps(Operand(rhsCopy), lhsCopy, temp1); // lhs UNORD rhs
|
||||
vptest(temp1, temp1); // check if any unordered
|
||||
j(Assembler::Equal, &l); // and exit if not
|
||||
|
@ -1028,11 +1029,12 @@ void MacroAssemblerX86Shared::minMaxFloat64x2AVX(bool isMin, FloatRegister lhs,
|
|||
if (isMin) {
|
||||
vminpd(Operand(rhs), lhs, temp2); // min lhs, rhs
|
||||
vminpd(Operand(lhs), rhs, temp1); // min rhs, lhs
|
||||
vorpd(temp1, temp2, output); // fix min(-0, 0) with OR
|
||||
} else {
|
||||
vmaxpd(Operand(rhs), lhs, temp2); // max lhs, rhs
|
||||
vmaxpd(Operand(lhs), rhs, temp1); // max rhs, lhs
|
||||
vandpd(temp1, temp2, output); // fix max(-0, 0) with AND
|
||||
}
|
||||
vorpd(temp1, temp2, output); // fix min(-0, 0) with OR
|
||||
vcmpunordpd(Operand(rhsCopy), lhsCopy, temp1); // lhs UNORD rhs
|
||||
vptest(temp1, temp1); // check if any unordered
|
||||
j(Assembler::Equal, &l); // and exit if not
|
||||
|
|
Загрузка…
Ссылка в новой задаче