summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
95e05dd)
If the instruction doesn't have enough operands, it
either shouldn't be marked as isCommutable or is malformed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248242
91177308-0d34-0410-b5e6-
96231b3b80d8
MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
bool NewMI) const {
MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
bool NewMI) const {
-
- if (MI->getNumOperands() < 3)
- return nullptr;
-
int CommutedOpcode = commuteOpcode(*MI);
if (CommutedOpcode == -1)
return nullptr;
int CommutedOpcode = commuteOpcode(*MI);
if (CommutedOpcode == -1)
return nullptr;