Fix fallout from 12-bit stuff landing: decide whether 20 bit displacements are needed during elimination of frame indexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp
index e3e5e0d..82018e8 100644
--- a/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -323,3 +323,47 @@
 
   return get(Opc);
 }
+
+const TargetInstrDesc&
+SystemZInstrInfo::getLongDispOpc(unsigned Opc) const {
+  switch (Opc) {
+  case SystemZ::MOV32mr:
+    Opc = SystemZ::MOV32mry;
+    break;
+  case SystemZ::MOV32rm:
+    Opc = SystemZ::MOV32rmy;
+    break;
+  case SystemZ::MOVSX32rm16:
+    Opc = SystemZ::MOVSX32rm16y;
+    break;
+  case SystemZ::MOV32m8r:
+    Opc = SystemZ::MOV32m8ry;
+    break;
+  case SystemZ::MOV32m16r:
+    Opc = SystemZ::MOV32m16ry;
+    break;
+  case SystemZ::MOV64m8r:
+    Opc = SystemZ::MOV64m8ry;
+    break;
+  case SystemZ::MOV64m16r:
+    Opc = SystemZ::MOV64m16ry;
+    break;
+  case SystemZ::MOV64m32r:
+    Opc = SystemZ::MOV64m32ry;
+    break;
+  case SystemZ::MUL32rm:
+    Opc = SystemZ::MUL32rmy;
+    break;
+  case SystemZ::CMP32rm:
+    Opc = SystemZ::CMP32rmy;
+    break;
+  case SystemZ::UCMP32rm:
+    Opc = SystemZ::UCMP32rmy;
+    break;
+  default:
+    break;
+  }
+
+  return get(Opc);
+}
+