1 ; RUN: llc < %s -mtriple=thumb-none-eabi -mcpu=cortex-m23 | \
2 ; RUN: FileCheck %s -check-prefix=CHECK
4 define i32 @f1(i32 %a, i32 %b) {
9 %tmp1 = sdiv i32 %a, %b ; <i32> [#uses=1]
13 define i32 @f2(i32 %a, i32 %b) {
17 %tmp1 = udiv i32 %a, %b ; <i32> [#uses=1]
21 define i32 @f3(i32 %a, i32 %b) {
26 %tmp1 = srem i32 %a, %b ; <i32> [#uses=1]
33 define i32 @f4(i32 %a, i32 %b) {
40 %tmp1 = urem i32 %a, %b ; <i32> [#uses=1]
45 define i64 @f5(i64 %a, i64 %b) {
49 ; EABI MODE = Remainder in R2-R3, quotient in R0-R1
50 ; CHECK: __aeabi_ldivmod
51 ; CHECK-NEXT: mov r0, r2
52 ; CHECK-NEXT: mov r1, r3
53 %tmp1 = srem i64 %a, %b ; <i64> [#uses=1]
57 define i64 @f6(i64 %a, i64 %b) {
61 ; EABI MODE = Remainder in R2-R3, quotient in R0-R1
62 ; CHECK: __aeabi_uldivmod
65 %tmp1 = urem i64 %a, %b ; <i64> [#uses=1]