[llvm] [MIPS] Use same logic as Clang when setting setMaxAtomicSizeInBitsSupported (PR #124218)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 21:59:47 PST 2025


================
@@ -519,10 +519,12 @@ MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM,
   setTargetDAGCombine({ISD::SDIVREM, ISD::UDIVREM, ISD::SELECT, ISD::AND,
                        ISD::OR, ISD::ADD, ISD::SUB, ISD::AssertZext, ISD::SHL});
 
-  if (Subtarget.isGP64bit())
+  if (ABI.IsN32() || ABI.IsN64())
----------------
wzssyqa wrote:

Any difference between `Subtarget.isGP64bit()` and `ABI.IsN32() || ABI.IsN64()`.
If we don't support O64 ABI, I guess that they are the same?
And in fact if we'd support O64, `Subtarget.isGP64bit()` may be better.

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


More information about the llvm-commits mailing list