Start handling more global variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116401 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 418a985..4a2a58e 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -620,8 +620,11 @@
 
   // FIXME: Handle global variables.
   if (const GlobalValue *GV = dyn_cast<GlobalValue>(Obj)) {
-    (void)GV;
-    return false;
+    unsigned Tmp = ARMMaterializeGV(GV, TLI.getValueType(Obj->getType()));
+    if (Tmp == 0) return false;
+    
+    Reg = Tmp;
+    return true;
   }
 
   // Try to get this in a register if nothing else has worked.