In a sense, it seems to me that the bug is that when the input nodes are the same, we should not be required or allowed to specify a use for the rhs because its use is already specified.
Bug 1707774 Comment 25 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
In a sense, it seems to me that the bug is that when the input nodes are the same, we should not be required or allowed to specify a use for the rhs because its use is already specified.
To wit, this code for multiply lowering:
```
if (lhs == rhs) {
LUse def = useRegisterAtStart(lhs);
lir->setOperand(0, def);
lir->setOperand(1, def);
} else {
lir->setOperand(1, useRegister(rhs));
}
defineReuseInput(lir, mul, 0);
```
passes the regalloc and generates good code.