prefer to materialize as local constants. This fixes the clang
bootstrap abort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107840
91177308-0d34-0410-b5e6-
96231b3b80d8
// In bottom-up mode, just create the virtual register which will be used
// to hold the value. It will be materialized later.
- if (isa<Instruction>(V)) {
+ if (isa<Instruction>(V) &&
+ (!isa<AllocaInst>(V) ||
+ !FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(V)))) {
Reg = createResultReg(TLI.getRegClassFor(VT));
FuncInfo.ValueMap[V] = Reg;
return Reg;