mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-23 14:03:14 +00:00
It's possible to commute instrctions with more than 3 operands.
llvm-svn: 43256
This commit is contained in:
parent
2cf65be2c4
commit
5391d0a39d
@ -143,7 +143,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
// so, swap the B and C operands. This makes the live ranges of A
|
||||
// and C joinable.
|
||||
// FIXME: This code also works for A := B op C instructions.
|
||||
if ((TID->Flags & M_COMMUTABLE) && mi->getNumOperands() == 3) {
|
||||
if ((TID->Flags & M_COMMUTABLE) && mi->getNumOperands() >= 3) {
|
||||
assert(mi->getOperand(3-si).isRegister() &&
|
||||
"Not a proper commutative instruction!");
|
||||
unsigned regC = mi->getOperand(3-si).getReg();
|
||||
|
Loading…
x
Reference in New Issue
Block a user