Revert r301231: Accidentally committed stale files

I forgot to commit local changes before commit.

llvm-svn: 301232
diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.cpp b/llvm/lib/Target/AVR/AVRInstrInfo.cpp
index 2074667..88f8892 100644
--- a/llvm/lib/Target/AVR/AVRInstrInfo.cpp
+++ b/llvm/lib/Target/AVR/AVRInstrInfo.cpp
@@ -142,9 +142,9 @@
       MFI.getObjectAlignment(FrameIndex));
 
   unsigned Opcode = 0;
-  if (TRI->hasType(*RC, MVT::i8)) {
+  if (RC->hasType(MVT::i8)) {
     Opcode = AVR::STDPtrQRr;
-  } else if (TRI->hasType(*RC, MVT::i16)) {
+  } else if (RC->hasType(MVT::i16)) {
     Opcode = AVR::STDWPtrQRr;
   } else {
     llvm_unreachable("Cannot store this register into a stack slot!");
@@ -176,9 +176,9 @@
       MFI.getObjectAlignment(FrameIndex));
 
   unsigned Opcode = 0;
-  if (TRI->hasType(*RC, MVT::i8)) {
+  if (RC->hasType(MVT::i8)) {
     Opcode = AVR::LDDRdPtrQ;
-  } else if (TRI->hasType(*RC, MVT::i16)) {
+  } else if (RC->hasType(MVT::i16)) {
     // Opcode = AVR::LDDWRdPtrQ;
     //:FIXME: remove this once PR13375 gets fixed
     Opcode = AVR::LDDWRdYQ;
diff --git a/llvm/lib/Target/AVR/AVRRegisterInfo.cpp b/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
index 50d4ff5..48798bd 100644
--- a/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
+++ b/llvm/lib/Target/AVR/AVRRegisterInfo.cpp
@@ -78,12 +78,11 @@
 const TargetRegisterClass *
 AVRRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
                                            const MachineFunction &MF) const {
-  const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
-  if (TRI->hasType(*RC, MVT::i16)) {
+  if (RC->hasType(MVT::i16)) {
     return &AVR::DREGSRegClass;
   }
 
-  if (TRI->hasType(*RC, MVT::i8)) {
+  if (RC->hasType(MVT::i8)) {
     return &AVR::GPR8RegClass;
   }