Home | History | Annotate | Download | only in Thumb2
      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 ; RUN: llc < %s -march=thumb -mcpu=swift \
      6 ; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV
      7 ; RUN: llc < %s -march=thumb -mcpu=cortex-r5 \
      8 ; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV
      9 
     10 define i32 @f1(i32 %a, i32 %b) {
     11 entry:
     12 ; CHECK-THUMB: f1
     13 ; CHECK-THUMB: __divsi3
     14 ; CHECK-THUMBV7M: f1
     15 ; CHECK-THUMBV7M: sdiv
     16 ; CHECK-HWDIV: f1
     17 ; CHECK-HWDIV: sdiv
     18         %tmp1 = sdiv i32 %a, %b         ; <i32> [#uses=1]
     19         ret i32 %tmp1
     20 }
     21 
     22 define i32 @f2(i32 %a, i32 %b) {
     23 entry:
     24 ; CHECK-THUMB: f2
     25 ; CHECK-THUMB: __udivsi3
     26 ; CHECK-THUMBV7M: f2
     27 ; CHECK-THUMBV7M: udiv
     28 ; CHECK-HWDIV: f2
     29 ; CHECK-HWDIV: udiv
     30         %tmp1 = udiv i32 %a, %b         ; <i32> [#uses=1]
     31         ret i32 %tmp1
     32 }
     33 
     34 define i32 @f3(i32 %a, i32 %b) {
     35 entry:
     36 ; CHECK-THUMB: f3
     37 ; CHECK-THUMB: __modsi3
     38 ; CHECK-THUMBV7M: f3
     39 ; CHECK-THUMBV7M: sdiv
     40 ; CHECK-HWDIV: f3
     41 ; CHECK-HWDIV: sdiv
     42         %tmp1 = srem i32 %a, %b         ; <i32> [#uses=1]
     43         ret i32 %tmp1
     44 }
     45 
     46 define i32 @f4(i32 %a, i32 %b) {
     47 entry:
     48 ; CHECK-THUMB: f4
     49 ; CHECK-THUMB: __umodsi3
     50 ; CHECK-THUMBV7M: f4
     51 ; CHECK-THUMBV7M: udiv
     52 ; CHECK-HWDIV: f4
     53 ; CHECK-HWDIV: udiv
     54         %tmp1 = urem i32 %a, %b         ; <i32> [#uses=1]
     55         ret i32 %tmp1
     56 }
     57 
     58