Index: tests_lit/assembler/arm32/sub.ll |
diff --git a/tests_lit/assembler/arm32/sub.ll b/tests_lit/assembler/arm32/sub.ll |
index 775c3317708a6b3017fc53eecc7be3f56c339f98..138f7bda9fe39eb2b7292d180a6c42b0aaad3030 100644 |
--- a/tests_lit/assembler/arm32/sub.ll |
+++ b/tests_lit/assembler/arm32/sub.ll |
@@ -1,5 +1,4 @@ |
; Show that we know how to translate instruction sub. |
-; TODO(kschimpf) Currently only know how to test subtract 1 from R0. |
; NOTE: We use -O2 to get rid of memory stores. |
@@ -25,3 +24,20 @@ define internal i32 @sub1FromR0(i32 %p) { |
; IASM-NEXT: .byte 0x40 |
; IASM-NEXT: .byte 0xe2 |
+ |
+define internal i32 @Sub2Regs(i32 %p1, i32 %p2) { |
+ %v = sub i32 %p1, %p2 |
+ ret i32 %v |
+} |
+ |
+; ASM-LABEL: Sub2Regs: |
+; ASM: sub r0, r0, r1 |
+; ASM-NEXT: bx lr |
+ |
+; IASM-LABEL: Sub2Regs: |
+ |
+; IASM: .byte 0x1 |
+; IASM-NEXT: .byte 0x0 |
+; IASM-NEXT: .byte 0x40 |
+; IASM-NEXT: .byte 0xe0 |
+ |