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

Jovan Dmitrović via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 06:17:52 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)
----------------
jdmitrovic-syrmia wrote:

I have noticed that sign-extension of `Incr` subword is removed. Why is that?

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


More information about the llvm-commits mailing list