[llvm] r189705 - Correct partially defined variable
Bill Schmidt
wschmidt at linux.vnet.ibm.com
Fri Aug 30 16:25:30 PDT 2013
Author: wschmidt
Date: Fri Aug 30 18:25:30 2013
New Revision: 189705
URL: http://llvm.org/viewvc/llvm-project?rev=189705&view=rev
Log:
Correct partially defined variable
Modified:
llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp?rev=189705&r1=189704&r2=189705&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp Fri Aug 30 18:25:30 2013
@@ -1294,7 +1294,7 @@ void PPCFastISel::finishCall(MVT RetVT,
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,
.addReg(SourcePhysReg);
}
+ assert(ResultReg && "ResultReg unset!");
UsedRegs.push_back(SourcePhysReg);
UpdateValueMap(I, ResultReg);
}
More information about the llvm-commits
mailing list