[llvm] [MIPS] Use same logic as Clang when setting setMaxAtomicSizeInBitsSupported (PR #124218)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 18:00:16 PST 2025
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/124218
None
>From 10e16a29e2ccf062e98003d270cb4be4f55a8ddc Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Thu, 23 Jan 2025 20:56:15 -0500
Subject: [PATCH] [MIPS] Use same logic as Clang when setting
setMaxAtomicSizeInBitsSupported
---
llvm/lib/Target/Mips/MipsISelLowering.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 7c4257c222c0baa..c208cc1dfdab840 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -519,9 +519,9 @@ 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())
setMaxAtomicSizeInBitsSupported(64);
- else
+ else if (Subtarget.hasMips2()())
setMaxAtomicSizeInBitsSupported(32);
setMinFunctionAlignment(Subtarget.isGP64bit() ? Align(8) : Align(4));
More information about the llvm-commits
mailing list