"sub $dst, $a, $b",
[(set IntRegs:$dst, (sub IntRegs:$a, addr_mode1:$b))]>;
+def SBCS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b),
+ "sbcs $dst, $a, $b",
+ [(set IntRegs:$dst, (sube IntRegs:$a, addr_mode1:$b))]>;
+
+def SUBS : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b),
+ "subs $dst, $a, $b",
+ [(set IntRegs:$dst, (subc IntRegs:$a, addr_mode1:$b))]>;
+
def AND : InstARM<(ops IntRegs:$dst, IntRegs:$a, op_addr_mode1:$b),
"and $dst, $a, $b",
[(set IntRegs:$dst, (and IntRegs:$a, addr_mode1:$b))]>;
; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-2147483648" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep ".word.*4294967295" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "adds" | wc -l | grep 1 &&
-; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1
+; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
+; RUN: llvm-as < %s | llc -march=arm | grep "subs" | wc -l | grep 1 &&
+; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1
long %f1() {
entry:
ret void
}
declare long %f8()
+
+long %f9(long %a, long %b) {
+entry:
+ %tmp = sub long %a, %b
+ ret long %tmp
+}