Correct partially defined variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Schmidt
2013-08-30 23:25:30 +00:00
parent af069a8920
commit 9056dd45a4

View File

@@ -1294,7 +1294,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs,
CopyVT = MVT::i64; CopyVT = MVT::i64;
unsigned SourcePhysReg = VA.getLocReg(); unsigned SourcePhysReg = VA.getLocReg();
unsigned ResultReg; unsigned ResultReg = 0;
if (RetVT == CopyVT) { if (RetVT == CopyVT) {
const TargetRegisterClass *CpyRC = TLI.getRegClassFor(CopyVT); const TargetRegisterClass *CpyRC = TLI.getRegClassFor(CopyVT);
@@ -1323,6 +1323,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs,
.addReg(SourcePhysReg); .addReg(SourcePhysReg);
} }
assert(ResultReg && "ResultReg unset!");
UsedRegs.push_back(SourcePhysReg); UsedRegs.push_back(SourcePhysReg);
UpdateValueMap(I, ResultReg); UpdateValueMap(I, ResultReg);
} }