ARM pre-UAL NEG mnemonic for convenience when porting old code.
[oota-llvm.git] / lib / Target / ARM / ARMInstrInfo.td
index 0b198f9129d8ff37204bf73ea90785aa72228d1f..b696bccefda26b0a16f7c2aa0c221a675b0f6f21 100644 (file)
@@ -5127,3 +5127,7 @@ def : ARMInstAlias<"ror${s}${p} $Rn, $Rm",
 // 'mul' instruction can be specified with only two operands.
 def : ARMInstAlias<"mul${s}${p} $Rn, $Rm",
                    (MUL rGPR:$Rn, rGPR:$Rm, rGPR:$Rn, pred:$p, cc_out:$s)>;
+
+// "neg" is and alias for "rsb rd, rn, #0"
+def : ARMInstAlias<"neg${s}${p} $Rd, $Rm",
+                   (RSBri GPR:$Rd, GPR:$Rm, 0, pred:$p, cc_out:$s)>;