[PATCH] D155379: [PowerPC] Reorder setMaxAtomicSizeInBitsSupported(). NFC

Brad Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 15 11:59:48 PDT 2023


brad created this revision.
brad added reviewers: MaskRay, nemanjai, PowerPC.
brad added a project: LLVM.
Herald added subscribers: shchenz, kbarton, hiraditya.
Herald added a project: All.
brad requested review of this revision.

Reorder setMaxAtomicSizeInBitsSupported() in numerical and more logical order.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155379

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1371,12 +1371,12 @@
     setLibcallName(RTLIB::MULO_I64, nullptr);
   }
 
-  if (!isPPC64)
-    setMaxAtomicSizeInBitsSupported(32);
-  else if (shouldInlineQuadwordAtomics())
+  if (shouldInlineQuadwordAtomics())
     setMaxAtomicSizeInBitsSupported(128);
-  else
+  else if (isPPC64)
     setMaxAtomicSizeInBitsSupported(64);
+  else
+    setMaxAtomicSizeInBitsSupported(32);
 
   setStackPointerRegisterToSaveRestore(isPPC64 ? PPC::X1 : PPC::R1);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155379.540717.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230715/6a5144e7/attachment.bin>


More information about the llvm-commits mailing list