[PATCH] D141189: [Mips] Set setMaxAtomicSizeInBitsSupported
Brad Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 7 00:56:22 PST 2023
brad created this revision.
brad added reviewers: atanasyan, sdardis.
brad added a project: LLVM.
Herald added subscribers: jrtc27, hiraditya, arichardson.
Herald added a project: All.
brad requested review of this revision.
Set setMaxAtomicSizeInBitsSupported for Mips. Set the value as appropriate for 64-bit MIPS vs 32-bit and take MIPS-I into consideration.
I am not quite sure if I used the appropriate Subtarget checks.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141189
Files:
llvm/lib/Target/Mips/MipsISelLowering.cpp
Index: llvm/lib/Target/Mips/MipsISelLowering.cpp
===================================================================
--- llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -493,6 +493,13 @@
setLibcallName(RTLIB::MULO_I128, nullptr);
}
+ if (Subtarget.isGP64bit())
+ setMaxAtomicSizeInBitsSupported(64);
+ else if (Subtarget.hasMips2())
+ setMaxAtomicSizeInBitsSupported(32);
+ else
+ setMaxAtomicSizeInBitsSupported(0);
+
setMinFunctionAlignment(Subtarget.isGP64bit() ? Align(8) : Align(4));
// The arguments on the stack are defined in terms of 4-byte slots on O32
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141189.487067.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230107/f32a3e1b/attachment.bin>
More information about the llvm-commits
mailing list