forked from OSchip/llvm-project
LegalizeSetCCCondCode - Reduce scope of NeedSwap to fix cppcheck warning. NFCI.
No need for this to be defined outside the only switch case its used in. llvm-svn: 370320
This commit is contained in:
parent
920b04011b
commit
dfb2a19ac2
|
@ -1627,7 +1627,6 @@ bool SelectionDAGLegalize::LegalizeSetCCCondCode(EVT VT, SDValue &LHS,
|
|||
MVT OpVT = LHS.getSimpleValueType();
|
||||
ISD::CondCode CCCode = cast<CondCodeSDNode>(CC)->get();
|
||||
NeedInvert = false;
|
||||
bool NeedSwap = false;
|
||||
switch (TLI.getCondCodeAction(CCCode, OpVT)) {
|
||||
default: llvm_unreachable("Unknown condition code action!");
|
||||
case TargetLowering::Legal:
|
||||
|
@ -1641,6 +1640,7 @@ bool SelectionDAGLegalize::LegalizeSetCCCondCode(EVT VT, SDValue &LHS,
|
|||
return true;
|
||||
}
|
||||
// Swapping operands didn't work. Try inverting the condition.
|
||||
bool NeedSwap = false;
|
||||
InvCC = getSetCCInverse(CCCode, OpVT.isInteger());
|
||||
if (!TLI.isCondCodeLegalOrCustom(InvCC, OpVT)) {
|
||||
// If inverting the condition is not enough, try swapping operands
|
||||
|
|
Loading…
Reference in New Issue