[llvm] [Mips] Do not emit instruction teq if divisor is non-zero immediate value in FastISel implementation (PR #135768)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 01:39:36 PDT 2025


================
@@ -1947,7 +1947,12 @@ bool MipsFastISel::selectDivRem(const Instruction *I, unsigned ISDOpcode) {
     return false;
 
   emitInst(DivOpc).addReg(Src0Reg).addReg(Src1Reg);
-  emitInst(Mips::TEQ).addReg(Src1Reg).addReg(Mips::ZERO).addImm(7);
+  if (const ConstantInt *C = dyn_cast<ConstantInt>(I->getOperand(1))) {
----------------
yingopq wrote:

OK, applied, thanks!

https://github.com/llvm/llvm-project/pull/135768


More information about the llvm-commits mailing list