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 5 6 define i32 @f1(i32 %a, i32 %b) { 7 entry: 8 ; CHECK-THUMB: f1 9 ; CHECK-THUMB: __divsi3 10 ; CHECK-THUMBV7M: f1 11 ; CHECK-THUMBV7M: sdiv 12 %tmp1 = sdiv i32 %a, %b ; <i32> [#uses=1] 13 ret i32 %tmp1 14 } 15 16 define i32 @f2(i32 %a, i32 %b) { 17 entry: 18 ; CHECK-THUMB: f2 19 ; CHECK-THUMB: __udivsi3 20 ; CHECK-THUMBV7M: f2 21 ; CHECK-THUMBV7M: udiv 22 %tmp1 = udiv i32 %a, %b ; <i32> [#uses=1] 23 ret i32 %tmp1 24 } 25 26 define i32 @f3(i32 %a, i32 %b) { 27 entry: 28 ; CHECK-THUMB: f3 29 ; CHECK-THUMB: __modsi3 30 ; CHECK-THUMBV7M: f3 31 ; CHECK-THUMBV7M: sdiv 32 %tmp1 = srem i32 %a, %b ; <i32> [#uses=1] 33 ret i32 %tmp1 34 } 35 36 define i32 @f4(i32 %a, i32 %b) { 37 entry: 38 ; CHECK-THUMB: f4 39 ; CHECK-THUMB: __umodsi3 40 ; CHECK-THUMBV7M: f4 41 ; CHECK-THUMBV7M: udiv 42 %tmp1 = urem i32 %a, %b ; <i32> [#uses=1] 43 ret i32 %tmp1 44 } 45 46