1 ; RUN: llc -mtriple thumbv7-windows-itanium -filetype asm -o - %s | FileCheck %s 2 ; RUN: llc -mtriple thumbv7-windows-msvc -filetype asm -o - %s | FileCheck %s 3 4 define arm_aapcs_vfpcc i32 @sdiv32(i32 %divisor, i32 %divident) { 5 entry: 6 %div = sdiv i32 %divident, %divisor 7 ret i32 %div 8 } 9 10 ; CHECK-LABEL: sdiv32: 11 ; CHECK: cbz r0 12 ; CHECK: bl __rt_sdiv 13 ; CHECK: __brkdiv0 14 15 define arm_aapcs_vfpcc i32 @udiv32(i32 %divisor, i32 %divident) { 16 entry: 17 %div = udiv i32 %divident, %divisor 18 ret i32 %div 19 } 20 21 ; CHECK-LABEL: udiv32: 22 ; CHECK: cbz r0 23 ; CHECK: bl __rt_udiv 24 ; CHECK: __brkdiv0 25 26 define arm_aapcs_vfpcc i64 @sdiv64(i64 %divisor, i64 %divident) { 27 entry: 28 %div = sdiv i64 %divident, %divisor 29 ret i64 %div 30 } 31 32 ; CHECK-LABEL: sdiv64: 33 ; CHECK: orrs.w r4, r0, r1 34 ; CHECK-NEXT: beq 35 ; CHECK: bl __rt_sdiv64 36 ; CHECK: __brkdiv0 37 38 define arm_aapcs_vfpcc i64 @udiv64(i64 %divisor, i64 %divident) { 39 entry: 40 %div = udiv i64 %divident, %divisor 41 ret i64 %div 42 } 43 44 ; CHECK-LABEL: udiv64: 45 ; CHECK: orrs.w r4, r0, r1 46 ; CHECK-NEXT: beq 47 ; CHECK: bl __rt_udiv64 48 ; CHECK: __brkdiv0 49 50