1 ; RUN: llc < %s -mtriple=thumb-apple-darwin -mattr=+thumb2 \
2 ; RUN: | FileCheck %s -check-prefix=CHECK-THUMB
3 ; RUN: llc < %s -march=thumb -mcpu=cortex-m3 -mattr=+thumb2 \
4 ; RUN: | FileCheck %s -check-prefix=CHECK-THUMBV7M
6 define i32 @f1(i32 %a, i32 %b) {
9 ; CHECK-THUMB: __divsi3
11 ; CHECK-THUMBV7M: sdiv
12 %tmp1 = sdiv i32 %a, %b ; <i32> [#uses=1]
16 define i32 @f2(i32 %a, i32 %b) {
19 ; CHECK-THUMB: __udivsi3
21 ; CHECK-THUMBV7M: udiv
22 %tmp1 = udiv i32 %a, %b ; <i32> [#uses=1]
26 define i32 @f3(i32 %a, i32 %b) {
29 ; CHECK-THUMB: __modsi3
31 ; CHECK-THUMBV7M: sdiv
32 %tmp1 = srem i32 %a, %b ; <i32> [#uses=1]
36 define i32 @f4(i32 %a, i32 %b) {
39 ; CHECK-THUMB: __umodsi3
41 ; CHECK-THUMBV7M: udiv
42 %tmp1 = urem i32 %a, %b ; <i32> [#uses=1]