mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
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
4d3ff7ac63
commit
b4b75ae7c2
@ -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
Block a user