ARM refactor away a bunch of VLD/VST pseudo instructions.

With the new composite physical registers to represent arbitrary pairs
of DPR registers, we don't need the pseudo-registers anymore. Get rid of
a bunch of them that use DPR register pairs and just use the real
instructions directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152045 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 2283a5a..845f0a3 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -44,6 +44,7 @@
 class ARMAsmParser : public MCTargetAsmParser {
   MCSubtargetInfo &STI;
   MCAsmParser &Parser;
+  const MCRegisterInfo *MRI;
 
   // Map of register aliases registers via the .req directive.
   StringMap<unsigned> RegisterReqs;
@@ -236,6 +237,9 @@
     : MCTargetAsmParser(), STI(_STI), Parser(_Parser) {
     MCAsmParserExtension::Initialize(_Parser);
 
+    // Cache the MCRegisterInfo.
+    MRI = &getContext().getRegisterInfo();
+
     // Initialize the set of available features.
     setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
 
@@ -1086,6 +1090,12 @@
     return VectorList.Count == 2;
   }
 
+  bool isVecListDPair() const {
+    if (!isSingleSpacedVectorList()) return false;
+    return (ARMMCRegisterClasses[ARM::DPairRegClassID]
+              .contains(VectorList.RegNum));
+  }
+
   bool isVecListThreeD() const {
     if (!isSingleSpacedVectorList()) return false;
     return VectorList.Count == 3;
@@ -2969,6 +2979,12 @@
       switch (LaneKind) {
       case NoLanes:
         E = Parser.getTok().getLoc();
+        // VLD1 wants a DPair register.
+        // FIXME: Make the rest of the two-reg instructions want the same
+        // thing.
+        Reg = MRI->getMatchingSuperReg(Reg, ARM::dsub_0,
+                                      &ARMMCRegisterClasses[ARM::DPairRegClassID]);
+
         Operands.push_back(ARMOperand::CreateVectorList(Reg, 2, false, S, E));
         break;
       case AllLanes:
@@ -3138,6 +3154,14 @@
 
   switch (LaneKind) {
   case NoLanes:
+    if (Count == 2 && Spacing == 1)
+      // VLD1 wants a DPair register.
+      // FIXME: Make the rest of the two-reg instructions want the same
+      // thing.
+      FirstReg = MRI->getMatchingSuperReg(FirstReg, ARM::dsub_0,
+                                   &ARMMCRegisterClasses[ARM::DPairRegClassID]);
+
+
     Operands.push_back(ARMOperand::CreateVectorList(FirstReg, Count,
                                                     (Spacing == 2), S, E));
     break;