Skip to content

[ARM] SUBSri is a sub imm opcode #145095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[ARM] SUBSri is a sub imm opcode #145095

wants to merge 1 commit into from

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Jun 20, 2025

It seems to have been forgotten.

It seems to have been forgotten.
@llvmbot
Copy link
Member

llvmbot commented Jun 20, 2025

@llvm/pr-subscribers-backend-arm

Author: AZero13 (AZero13)

Changes

It seems to have been forgotten.


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

1 Files Affected:

  • (modified) llvm/lib/Target/ARM/ARMBaseInstrInfo.h (+2-3)
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
index 71de3c6ad597a..468e272bc7dc9 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
@@ -724,9 +724,8 @@ static inline bool isPushOpcode(int Opc) {
 }
 
 static inline bool isSubImmOpcode(int Opc) {
-  return Opc == ARM::SUBri ||
-         Opc == ARM::tSUBi3 || Opc == ARM::tSUBi8 ||
-         Opc == ARM::tSUBSi3 || Opc == ARM::tSUBSi8 ||
+  return Opc == ARM::SUBri || Opc == ARM::SUBSri || Opc == ARM::tSUBi3 ||
+         Opc == ARM::tSUBi8 || Opc == ARM::tSUBSi3 || Opc == ARM::tSUBSi8 ||
          Opc == ARM::t2SUBri || Opc == ARM::t2SUBri12 || Opc == ARM::t2SUBSri;
 }
 

@davemgreen
Copy link
Collaborator

It looks like this function is only used in one place and that use only applies to Thumb instructions (not Arm). Do you have a motivating reason to add this? (And by extension, add a test for it).

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