Bug 1763163 - Part 3: Reduce temp registers for LNotV. r=iain

We can use the output register as a temp register for `testValueTruthy()`.

Depends on D142955

Differential Revision: https://phabricator.services.mozilla.com/D142956
This commit is contained in:
André Bargull 2022-04-07 07:53:49 +00:00
Родитель d90afc8c37
Коммит 12d2a01868
3 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -10887,12 +10887,11 @@ void CodeGenerator::visitNotV(LNotV* lir) {
ValueOperand input = ToValue(lir, LNotV::InputIndex);
Register temp1 = ToRegister(lir->temp1());
Register temp2 = ToRegister(lir->temp2());
FloatRegister floatTemp = ToFloatRegister(lir->temp0());
Register output = ToRegister(lir->output());
const TypeDataList& observedTypes = lir->mir()->observedTypes();
testValueTruthy(input, temp1, temp2, floatTemp, observedTypes, ifTruthy,
testValueTruthy(input, temp1, output, floatTemp, observedTypes, ifTruthy,
ifFalsy, ool);
Label join;

Просмотреть файл

@ -770,7 +770,7 @@
result_type: WordSized
operands:
input: BoxedValue
num_temps: 3
num_temps: 2
mir_op: Not
- name: BitNotI

Просмотреть файл

@ -3495,7 +3495,7 @@ void LIRGenerator::visitNot(MNot* ins) {
define(new (alloc()) LNotO(useRegister(op)), ins);
break;
case MIRType::Value: {
auto* lir = new (alloc()) LNotV(useBox(op), tempDouble(), temp(), temp());
auto* lir = new (alloc()) LNotV(useBox(op), tempDouble(), temp());
define(lir, ins);
break;
}