Skip to content

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Sep 10, 2025

ARMISD::CMN is not used at the moment, hence why no tests, but I plan on using it soon.

However, it is Commutative, because it is just an adds but throwing away the result.

ARMISD::CMN is not used at the moment, but I plan on making it soon.

However, it is Commutative, because it is just an adds but throwing away the result.
@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2025

@llvm/pr-subscribers-backend-arm

Author: AZero13 (AZero13)

Changes

ARMISD::CMN is not used at the moment, hence why no tests, but I plan on making it soon.

However, it is Commutative, because it is just an adds but throwing away the result.


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

1 Files Affected:

  • (modified) llvm/lib/Target/ARM/ARMInstrInfo.td (+1-1)
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td
index bdb16d7d39266..205a889b48011 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.td
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.td
@@ -206,7 +206,7 @@ def ARMBcci64        : SDNode<"ARMISD::BCC_i64", SDT_ARMBCC_i64,
 
 def ARMcmp           : SDNode<"ARMISD::CMP", SDT_ARMCmp>;
 
-def ARMcmn           : SDNode<"ARMISD::CMN", SDT_ARMCmp>;
+def ARMcmn           : SDNode<"ARMISD::CMN", SDT_ARMCmp, [SDNPCommutative]>;
 
 def ARMcmpZ          : SDNode<"ARMISD::CMPZ", SDT_ARMCmp, [SDNPCommutative]>;
 

@AZero13 AZero13 closed this Sep 22, 2025
@AZero13 AZero13 deleted the demand branch September 22, 2025 21:49
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.

2 participants