From eb9164dc50ec2e532cd559f884a2785be9823b35 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 7 Jul 2010 23:52:58 +0000 Subject: Don't forward-declare registers for static allocas, which we'll prefer to materialize as local constants. This fixes the clang bootstrap abort. llvm-svn: 107840 --- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 5a245122775..5b566f675fe 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -120,7 +120,9 @@ unsigned FastISel::getRegForValue(const Value *V) { // In bottom-up mode, just create the virtual register which will be used // to hold the value. It will be materialized later. - if (isa(V)) { + if (isa(V) && + (!isa(V) || + !FuncInfo.StaticAllocaMap.count(cast(V)))) { Reg = createResultReg(TLI.getRegClassFor(VT)); FuncInfo.ValueMap[V] = Reg; return Reg; -- cgit v1.2.3