We're not going to handle dynamic allocas anywhere else.
authorEric Christopher <echristo@apple.com>
Mon, 11 Oct 2010 21:37:35 +0000 (21:37 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 11 Oct 2010 21:37:35 +0000 (21:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116240 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index cfe21c0df7b877e74d9a882b424391be693dd74c..df3fe1bc2755778d6ac591447ee68a0bf8a360b9 100644 (file)
@@ -589,7 +589,9 @@ bool ARMFastISel::ARMComputeRegOffset(const Value *Obj, unsigned &Reg,
     default:
     break;
     case Instruction::Alloca: {
-      assert(false && "Alloca should have been handled earlier!");
+      // Don't handle dynamic allocas.
+      if (FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(Obj)))
+        assert(false && "Alloca should have been handled earlier!");
       return false;
     }
   }