Skip to content

Commit 2310cf1

Browse files
committed
[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.
1 parent a49030e commit 2310cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/ARM/ARMInstrInfo.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def ARMBcci64 : SDNode<"ARMISD::BCC_i64", SDT_ARMBCC_i64,
206206

207207
def ARMcmp : SDNode<"ARMISD::CMP", SDT_ARMCmp>;
208208

209-
def ARMcmn : SDNode<"ARMISD::CMN", SDT_ARMCmp>;
209+
def ARMcmn : SDNode<"ARMISD::CMN", SDT_ARMCmp, [SDNPCommutative]>;
210210

211211
def ARMcmpZ : SDNode<"ARMISD::CMPZ", SDT_ARMCmp, [SDNPCommutative]>;
212212

0 commit comments

Comments
 (0)