1 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - \
2 ; RUN: | FileCheck %s -check-prefix=CHECK-THUMB
3 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-m3 -mattr=+thumb2 %s -o - \
4 ; RUN: | FileCheck %s -check-prefix=CHECK-THUMBV7M
5 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=swift %s -o - \
6 ; RUN: | FileCheck %s -check-prefix=CHECK-HWDIV
7 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r4 %s -o - \
8 ; RUN: | FileCheck %s -check-prefix=CHECK-HWDIV
9 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r4f %s -o - \
10 ; RUN: | FileCheck %s -check-prefix=CHECK-HWDIV
11 ; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r5 %s -o - \
12 ; RUN: | FileCheck %s -check-prefix=CHECK-HWDIV
14 define i32 @f1(i32 %a, i32 %b) {
17 ; CHECK-THUMB: __divsi3
19 ; CHECK-THUMBV7M: sdiv
22 %tmp1 = sdiv i32 %a, %b ; <i32> [#uses=1]
26 define i32 @f2(i32 %a, i32 %b) {
29 ; CHECK-THUMB: __udivsi3
31 ; CHECK-THUMBV7M: udiv
34 %tmp1 = udiv i32 %a, %b ; <i32> [#uses=1]
38 define i32 @f3(i32 %a, i32 %b) {
41 ; CHECK-THUMB: __modsi3
43 ; CHECK-THUMBV7M: sdiv
46 %tmp1 = srem i32 %a, %b ; <i32> [#uses=1]
50 define i32 @f4(i32 %a, i32 %b) {
53 ; CHECK-THUMB: __umodsi3
55 ; CHECK-THUMBV7M: udiv
58 %tmp1 = urem i32 %a, %b ; <i32> [#uses=1]