[llvm] 7fa48ce - [AMDGPU] Remove an unnecessary cast (NFC) (#149254)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 07:22:47 PDT 2025


Author: Kazu Hirata
Date: 2025-07-17T07:22:43-07:00
New Revision: 7fa48ce547ef9e0516564eca9c375109e83f2f71

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

LOG: [AMDGPU] Remove an unnecessary cast (NFC) (#149254)

getTargetLowering() already returns const SITargetLowering *.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
index b0d6fd95cd271..5097ac03954d5 100644
--- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -2225,8 +2225,7 @@ bool SILoadStoreOptimizer::promoteConstantOffsetToImm(
   MachineBasicBlock::iterator E = MBB->end();
   MachineBasicBlock::iterator MBBI = MI.getIterator();
   ++MBBI;
-  const SITargetLowering *TLI =
-    static_cast<const SITargetLowering *>(STM->getTargetLowering());
+  const SITargetLowering *TLI = STM->getTargetLowering();
 
   for ( ; MBBI != E; ++MBBI) {
     MachineInstr &MINext = *MBBI;


        


More information about the llvm-commits mailing list