@@ -1134,7 +1134,7 @@ unsigned RISCVCC::getBrCond(RISCVCC::CondCode CC, unsigned SelectOpc) {
1134
1134
}
1135
1135
}
1136
1136
1137
- RISCVCC::CondCode RISCVCC::getOppositeBranchCondition (RISCVCC::CondCode CC) {
1137
+ RISCVCC::CondCode RISCVCC::getInverseBranchCondition (RISCVCC::CondCode CC) {
1138
1138
switch (CC) {
1139
1139
default :
1140
1140
llvm_unreachable (" Unrecognized conditional branch" );
@@ -1554,7 +1554,7 @@ bool RISCVInstrInfo::optimizeCondBranch(MachineInstr &MI) const {
1554
1554
return Register ();
1555
1555
};
1556
1556
1557
- unsigned NewOpc = RISCVCC::getBrCond (getOppositeBranchCondition (CC));
1557
+ unsigned NewOpc = RISCVCC::getBrCond (getInverseBranchCondition (CC));
1558
1558
1559
1559
// Might be case 1.
1560
1560
// Don't change 0 to 1 since we can use x0.
@@ -1801,7 +1801,7 @@ RISCVInstrInfo::optimizeSelect(MachineInstr &MI,
1801
1801
// Add condition code, inverting if necessary.
1802
1802
auto CC = static_cast <RISCVCC::CondCode>(MI.getOperand (3 ).getImm ());
1803
1803
if (Invert)
1804
- CC = RISCVCC::getOppositeBranchCondition (CC);
1804
+ CC = RISCVCC::getInverseBranchCondition (CC);
1805
1805
NewMI.addImm (CC);
1806
1806
1807
1807
// Copy the false register.
@@ -3978,7 +3978,7 @@ MachineInstr *RISCVInstrInfo::commuteInstructionImpl(MachineInstr &MI,
3978
3978
case RISCV::PseudoCCMOVGPR: {
3979
3979
// CCMOV can be commuted by inverting the condition.
3980
3980
auto CC = static_cast <RISCVCC::CondCode>(MI.getOperand (3 ).getImm ());
3981
- CC = RISCVCC::getOppositeBranchCondition (CC);
3981
+ CC = RISCVCC::getInverseBranchCondition (CC);
3982
3982
auto &WorkingMI = cloneIfNew (MI);
3983
3983
WorkingMI.getOperand (3 ).setImm (CC);
3984
3984
return TargetInstrInfo::commuteInstructionImpl (WorkingMI, /* NewMI*/ false ,
0 commit comments