diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 9fa37b16c4b..33da2b07f7b 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -31,6 +31,8 @@ unsigned FastISel::getRegForValue(Value *V, DenseMap &Va if (CI->getValue().getActiveBits() > 64) return 0; Reg = FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue()); + } else if (isa(V)) { + Reg = FastEmit_i(VT, VT, ISD::Constant, 0); } else if (ConstantFP *CF = dyn_cast(V)) { Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF); @@ -53,6 +55,9 @@ unsigned FastISel::getRegForValue(Value *V, DenseMap &Va if (Reg == 0) return 0; } + } else if (isa(V)) { + Reg = createResultReg(TLI.getRegClassFor(VT)); + BuildMI(MBB, TII.get(TargetInstrInfo::IMPLICIT_DEF), Reg); } return Reg;