summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-11-28 10:31:27 +0000
committerDuncan Sands <baldrick@free.fr>2011-11-28 10:31:27 +0000
commit12330650f843cf7613444e345a4ecfcf06923761 (patch)
treec9a7283cab4e6070c956dbccaef61f1d92d379bd /llvm/lib/Target/ARM/ARMFastISel.cpp
parent818a983e93c1847f21744cb0b07f2b32d5acddc9 (diff)
downloadbcm5719-llvm-12330650f843cf7613444e345a4ecfcf06923761.tar.gz
bcm5719-llvm-12330650f843cf7613444e345a4ecfcf06923761.zip
Silence wrong warnings from GCC about variables possibly being used
uninitialized: GCC doesn't understand that the variables are only used if !UseImm, in which case they have been initialized. llvm-svn: 145239
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 9bae422273f..42fd8a6ab91 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -1360,7 +1360,7 @@ bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
unsigned SrcReg1 = getRegForValue(Src1Value);
if (SrcReg1 == 0) return false;
- unsigned SrcReg2;
+ unsigned SrcReg2 = 0;
if (!UseImm) {
SrcReg2 = getRegForValue(Src2Value);
if (SrcReg2 == 0) return false;
@@ -1577,7 +1577,7 @@ bool ARMFastISel::SelectSelect(const Instruction *I) {
(ARM_AM::getSOImmVal(Imm) != -1);
}
- unsigned Op2Reg;
+ unsigned Op2Reg = 0;
if (!UseImm) {
Op2Reg = getRegForValue(I->getOperand(2));
if (Op2Reg == 0) return false;
OpenPOWER on IntegriCloud