[llvm] [AMDGPU] Remove an unnecessary cast (NFC) (PR #156139)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 20:58:19 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/156139
getOpcode() already returns unsigned.
>From 22bb5269758231317e86142418a896d43fc30e0d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 29 Aug 2025 09:31:03 -0700
Subject: [PATCH] [AMDGPU] Remove an unnecessary cast (NFC)
getOpcode() already returns unsigned.
---
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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