summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-08-30 23:25:30 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-08-30 23:25:30 +0000
commit9056dd45a4402cf6266b61f219aa56651633b2c1 (patch)
treebdcbfe6a21784f2c1c9ad32f3820d7de0dca437d
parentaf069a8920098843cda3352c3e2614ff5164e1b7 (diff)
downloadllvm-9056dd45a4402cf6266b61f219aa56651633b2c1.tar.gz
llvm-9056dd45a4402cf6266b61f219aa56651633b2c1.tar.bz2
llvm-9056dd45a4402cf6266b61f219aa56651633b2c1.tar.xz
Correct partially defined variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189705 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCFastISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCFastISel.cpp b/lib/Target/PowerPC/PPCFastISel.cpp
index 8a88e76e90..0276668e3e 100644
--- a/lib/Target/PowerPC/PPCFastISel.cpp
+++ b/lib/Target/PowerPC/PPCFastISel.cpp
@@ -1294,7 +1294,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs,
CopyVT = MVT::i64;
unsigned SourcePhysReg = VA.getLocReg();
- unsigned ResultReg;
+ unsigned ResultReg = 0;
if (RetVT == CopyVT) {
const TargetRegisterClass *CpyRC = TLI.getRegClassFor(CopyVT);
@@ -1323,6 +1323,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs,
.addReg(SourcePhysReg);
}
+ assert(ResultReg && "ResultReg unset!");
UsedRegs.push_back(SourcePhysReg);
UpdateValueMap(I, ResultReg);
}