[llvm] 8e6ef2d - [Hexagon] Remove a redundant cast (NFC) (#165654)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 07:11:05 PDT 2025


Author: Kazu Hirata
Date: 2025-10-30T07:11:01-07:00
New Revision: 8e6ef2d51b639a20b7cc29113d1eb38c81ea84d1

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

LOG: [Hexagon] Remove a redundant cast (NFC) (#165654)

*getInstrInfo() is already of type const HexagonInstrInfo &.

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/HexagonSubtarget.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp b/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
index b9cdd6a2a3767..ce2de752f3b3a 100644
--- a/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
@@ -544,7 +544,7 @@ int HexagonSubtarget::updateLatency(MachineInstr &SrcInst,
   if (!hasV60Ops())
     return Latency;
 
-  auto &QII = static_cast<const HexagonInstrInfo &>(*getInstrInfo());
+  const HexagonInstrInfo &QII = *getInstrInfo();
   // BSB scheduling.
   if (QII.isHVXVec(SrcInst) || useBSBScheduling())
     Latency = (Latency + 1) >> 1;


        


More information about the llvm-commits mailing list