[llvm] 7da8f73 - [AMDGPU] Remove an unnecessary cast (NFC) (#148868)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 20:47:34 PDT 2025


Author: Kazu Hirata
Date: 2025-07-15T20:47:31-07:00
New Revision: 7da8f7394f8f0847dd1a29a9fbab5043fe307bae

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

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

STI is already of const GCNSubtarget *.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 67ad28661da43..75ce67c00228d 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -42,7 +42,7 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F,
       PrivateSegmentWaveByteOffset(false), WorkItemIDX(false),
       WorkItemIDY(false), WorkItemIDZ(false), ImplicitArgPtr(false),
       GITPtrHigh(0xffffffff), HighBitsOf32BitAddress(0) {
-  const GCNSubtarget &ST = *static_cast<const GCNSubtarget *>(STI);
+  const GCNSubtarget &ST = *STI;
   FlatWorkGroupSizes = ST.getFlatWorkGroupSizes(F);
   WavesPerEU = ST.getWavesPerEU(F);
   MaxNumWorkGroups = ST.getMaxNumWorkGroups(F);


        


More information about the llvm-commits mailing list