make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.
authorChris Lattner <sabre@nondot.org>
Thu, 12 Feb 2009 17:23:20 +0000 (17:23 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Feb 2009 17:23:20 +0000 (17:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64379 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/FastISel.cpp

index 04e97212ddf33daf5dc946d55c5befe5d7581271..fb3d101f1221baf6285f82d8cbb4c1ff2c58c336 100644 (file)
@@ -388,11 +388,11 @@ bool FastISel::SelectCall(User *I) {
       if (BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
         Address = BCI->getOperand(0);
       AllocaInst *AI = dyn_cast<AllocaInst>(Address);
-      // Don't handle byval struct arguments, for example.
+      // Don't handle byval struct arguments or VLAs, for example.
       if (!AI) break;
       DenseMap<const AllocaInst*, int>::iterator SI =
         StaticAllocaMap.find(AI);
-      assert(SI != StaticAllocaMap.end() && "Invalid dbg.declare!");
+      if (SI == StaticAllocaMap.end()) break; // VLAs.
       int FI = SI->second;
 
       // Determine the debug globalvariable.