File tree 1 file changed +6
-4
lines changed
llvm/lib/Target/RISCV/GISel
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -545,21 +545,23 @@ void RISCVInstructionSelector::getICMPOperandsForBranch(
545
545
MachineInstr *Zero = MIB.buildConstant (
546
546
MRI.getType (MaybeConstant->getOperand (0 ).getReg ()), 0 );
547
547
selectConstant (*Zero, MIB, MRI);
548
- CC = getRISCVCCFromICMP (CmpInst::Predicate::ICMP_SGE) ;
548
+ CC = RISCVCC::COND_GE ;
549
549
RHS = Zero->getOperand (0 ).getReg ();
550
+ return ;
550
551
}
551
- return ;
552
+ break ;
552
553
case CmpInst::Predicate::ICMP_SLT:
553
554
// Convert X < 1 to 0 >= X
554
555
if (MaybeConstant->getOperand (1 ).getCImm ()->getSExtValue () == 1 ) {
555
556
MachineInstr *Zero = MIB.buildConstant (
556
557
MRI.getType (MaybeConstant->getOperand (0 ).getReg ()), 0 );
557
558
selectConstant (*Zero, MIB, MRI);
558
- CC = getRISCVCCFromICMP (CmpInst::Predicate::ICMP_SGE) ;
559
+ CC = RISCVCC::COND_GE ;
559
560
RHS = LHS;
560
561
LHS = Zero->getOperand (0 ).getReg ();
562
+ return ;
561
563
}
562
- return ;
564
+ break ;
563
565
default :
564
566
break ;
565
567
}
You can’t perform that action at this time.
0 commit comments