[llvm] a3e524d - [PowerPC] Reorder setMaxAtomicSizeInBitsSupported(). NFC

Brad Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 22 17:03:15 PDT 2023


Author: Brad Smith
Date: 2023-07-22T20:01:27-04:00
New Revision: a3e524df904963428dd6107167a3ac99b731a476

URL: https://github.com/llvm/llvm-project/commit/a3e524df904963428dd6107167a3ac99b731a476
DIFF: https://github.com/llvm/llvm-project/commit/a3e524df904963428dd6107167a3ac99b731a476.diff

LOG: [PowerPC] Reorder setMaxAtomicSizeInBitsSupported(). NFC

Reorder setMaxAtomicSizeInBitsSupported() in numerical and more logical order.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D155379

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 47960df4cace71..c1380da4fccbac 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1371,12 +1371,12 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     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);
 


        


More information about the llvm-commits mailing list