From 2310cf11b99413d74cafacbc5a04b0125a19c10a Mon Sep 17 00:00:00 2001 From: AZero13 Date: Wed, 10 Sep 2025 12:08:04 -0400 Subject: [PATCH] [ARM] CMN is commutative 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. --- llvm/lib/Target/ARM/ARMInstrInfo.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]>;