[llvm] d2fda70 - [AArch64] Remove an unnecessary cast (NFC) (#156139)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 30 10:01:30 PDT 2025


Author: Kazu Hirata
Date: 2025-08-30T10:01:26-07:00
New Revision: d2fda70afc77f37f99936d5257989b5367033f07

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

LOG: [AArch64] Remove an unnecessary cast (NFC) (#156139)

getOpcode() already returns unsigned.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 68f708c25a241..3ce7829207cb6 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -6718,7 +6718,7 @@ static bool canCombine(MachineBasicBlock &MBB, MachineOperand &MO,
   if (MO.isReg() && MO.getReg().isVirtual())
     MI = MRI.getUniqueVRegDef(MO.getReg());
   // And it needs to be in the trace (otherwise, it won't have a depth).
-  if (!MI || MI->getParent() != &MBB || (unsigned)MI->getOpcode() != CombineOpc)
+  if (!MI || MI->getParent() != &MBB || MI->getOpcode() != CombineOpc)
     return false;
   // Must only used by the user we combine with.
   if (!MRI.hasOneNonDBGUse(MI->getOperand(0).getReg()))


        


More information about the llvm-commits mailing list