Silence a gcc-4.6 warning: GCC fails to understand that secondReg and cmpOp2 are

correlated, and thinks that cmpOp2 may be used uninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2012-06-09 10:04:03 +00:00
parent 8bf75ed41c
commit af0d459e36

View File

@ -222,7 +222,7 @@ static bool canCompareBeNewValueJump(const HexagonInstrInfo *QII,
return false;
}
unsigned cmpReg1, cmpOp2;
unsigned cmpReg1, cmpOp2 = 0; // cmpOp2 assignment silences compiler warning.
cmpReg1 = MI->getOperand(1).getReg();
if (secondReg) {