[llvm] [Mips] Fix atomic min/max generate mips4 instructions when compiling for mips2 (PR #159717)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 01:05:57 PDT 2025
================
@@ -432,23 +432,44 @@ bool MipsExpandPseudo::expandAtomicBinOpSubword(
Register OldVal = I->getOperand(6).getReg();
Register BinOpRes = I->getOperand(7).getReg();
Register StoreVal = I->getOperand(8).getReg();
+ bool NoMovnInstr = (IsMin || IsMax) && !STI->hasMips4() && !STI->hasMips32();
const BasicBlock *LLVM_BB = BB.getBasicBlock();
MachineBasicBlock *loopMBB = MF->CreateMachineBasicBlock(LLVM_BB);
+ MachineBasicBlock *loop1MBB = NULL;
+ MachineBasicBlock *loop2MBB = NULL;
----------------
yingopq wrote:
Applied.
https://github.com/llvm/llvm-project/pull/159717
More information about the llvm-commits
mailing list