Skip to content

Conversation

kazutakahirata
Copy link
Contributor

getOpcode() already returns unsigned.

getOpcode() already returns unsigned.
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Kazu Hirata (kazutakahirata)

Changes

getOpcode() already returns unsigned.


Full diff: https://github.com/llvm/llvm-project/pull/156139.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64InstrInfo.cpp (+1-1)
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()))

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title is wrong, this doesn't touch amdgpu

@kazutakahirata kazutakahirata changed the title [AMDGPU] Remove an unnecessary cast (NFC) [AArch64] Remove an unnecessary cast (NFC) Aug 30, 2025
@kazutakahirata
Copy link
Contributor Author

Title is wrong, this doesn't touch amdgpu

Oops. Sorry about that. Fixed.

@kazutakahirata kazutakahirata merged commit d2fda70 into llvm:main Aug 30, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250829_cast_llvm_AMDGPU branch August 30, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants