[arm-fast-isel] Fix handling of the frameaddress intrinsic. If depth is 0
authorChad Rosier <mcrosier@apple.com>
Fri, 1 Jun 2012 21:12:31 +0000 (21:12 +0000)
committerChad Rosier <mcrosier@apple.com>
Fri, 1 Jun 2012 21:12:31 +0000 (21:12 +0000)
then DestReg is undefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157840 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index 2d2d401dceb1b73e1407371b666bc5943b164de1..b353992b3ba3d01d99813a9081597a539e7d8396 100644 (file)
@@ -2439,7 +2439,7 @@ bool ARMFastISel::SelectIntrinsicCall(const IntrinsicInst &I) {
                       .addReg(SrcReg).addImm(0));
       SrcReg = DestReg;
     }
-    UpdateValueMap(&I, DestReg);
+    UpdateValueMap(&I, SrcReg);
     return true;
   }
   case Intrinsic::memcpy: