Fix some warnings, some of which were spurious, and some of which were real
[oota-llvm.git] / lib / Target / X86 / X86InstrInfo.cpp
index 298af02d8aec2752d12d4e1c9ec35488cf881d2d..caffe62867b1d1c8d0de3fe86e1ce4155c635c78 100644 (file)
@@ -29,8 +29,8 @@ X86InstrInfo::X86InstrInfo()
 // another instruction, e.g. X86: `xchg ax, ax'; SparcV9: `sethi r0, r0, r0'
 //
 MachineInstr* X86InstrInfo::createNOPinstr() const {
-  return BuildMI(X86::XCHGrr16, 2).addReg(X86::AX, MOTy::UseAndDef)
-                                  .addReg(X86::AX, MOTy::UseAndDef);
+  return BuildMI(X86::XCHGrr16, 2).addReg(X86::AX, MachineOperand::UseAndDef)
+                                  .addReg(X86::AX, MachineOperand::UseAndDef);
 }
 
 
@@ -61,8 +61,8 @@ bool X86InstrInfo::isMoveInstr(const MachineInstr& MI,
              MI.getOperand(0).isRegister() &&
              MI.getOperand(1).isRegister() &&
              "invalid register-register move instruction");
-      sourceReg = MI.getOperand(1).getAllocatedRegNum();
-      destReg = MI.getOperand(0).getAllocatedRegNum();
+      sourceReg = MI.getOperand(1).getReg();
+      destReg = MI.getOperand(0).getReg();
       return true;
   }
   return false;