Add PPC instruction record forms and associated query functions
[oota-llvm.git] / lib / Target / PowerPC / PPCInstrInfo.cpp
index ccd1247a388922e87ebb8c7dd993bc88daee7589..68ea976c344fe494f775f9bb8118cdc9886b2813 100644 (file)
@@ -149,7 +149,8 @@ PPCInstrInfo::commuteInstruction(MachineInstr *MI, bool NewMI) const {
   MachineFunction &MF = *MI->getParent()->getParent();
 
   // Normal instructions can be commuted the obvious way.
-  if (MI->getOpcode() != PPC::RLWIMI)
+  if (MI->getOpcode() != PPC::RLWIMI &&
+      MI->getOpcode() != PPC::RLWIMIo)
     return TargetInstrInfo::commuteInstruction(MI, NewMI);
 
   // Cannot commute if it has a non-zero rotate count.