[llvm] [MIPS]: Rework atomic max/min expand for subword (PR #89575)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 00:04:09 PDT 2024


================
@@ -473,48 +476,38 @@ bool MipsExpandPseudo::expandAtomicBinOpSubword(
     unsigned SELOldVal = IsMax ? SELEQZ : SELNEZ;
     unsigned MOVIncr = IsMax ? MOVN : MOVZ;
 
-    // For little endian we need to clear uninterested bits.
-    if (STI->isLittle()) {
-      if (!IsUnsigned) {
-        BuildMI(loopMBB, DL, TII->get(Mips::SRAV), OldVal)
-            .addReg(OldVal)
-            .addReg(ShiftAmnt);
-        BuildMI(loopMBB, DL, TII->get(Mips::SRAV), Incr)
-            .addReg(Incr)
----------------
yingopq wrote:

Yes, now it is OK for ```a <- op(a)```, the scenario where my lab error reported is ```b <- op(a, RegState::Kill) + op(a)```.

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


More information about the llvm-commits mailing list