[arm-fast-isel] Fix handling of the frameaddress intrinsic.  If depth is 0
then DestReg is undefined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157840 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 2d2d401..b353992 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -2439,7 +2439,7 @@
                       .addReg(SrcReg).addImm(0));
       SrcReg = DestReg;
     }
-    UpdateValueMap(&I, DestReg);
+    UpdateValueMap(&I, SrcReg);
     return true;
   }
   case Intrinsic::memcpy: