brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 80a842d Raw
62 lines · plain
1; RUN: llc -mtriple=thumb-apple-darwin -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - \2; RUN:    | FileCheck %s -check-prefix=CHECK-THUMB3; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-m3 -mattr=+thumb2 %s -o - \4; RUN:    | FileCheck %s -check-prefix=CHECK-THUMBV7M5; RUN: llc -mtriple=thumb-apple-darwin -mcpu=swift %s -o - \6; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV7; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r4 %s -o - \8; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV9; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r4f %s -o - \10; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV11; RUN: llc -mtriple=thumb-apple-darwin -mcpu=cortex-r5 %s -o - \12; RUN:    | FileCheck %s -check-prefix=CHECK-HWDIV13 14define i32 @f1(i32 %a, i32 %b) {15entry:16; CHECK-THUMB: f117; CHECK-THUMB: __divsi318; CHECK-THUMBV7M: f119; CHECK-THUMBV7M: sdiv20; CHECK-HWDIV: f121; CHECK-HWDIV: sdiv22        %tmp1 = sdiv i32 %a, %b         ; <i32> [#uses=1]23        ret i32 %tmp124}25 26define i32 @f2(i32 %a, i32 %b) {27entry:28; CHECK-THUMB: f229; CHECK-THUMB: __udivsi330; CHECK-THUMBV7M: f231; CHECK-THUMBV7M: udiv32; CHECK-HWDIV: f233; CHECK-HWDIV: udiv34        %tmp1 = udiv i32 %a, %b         ; <i32> [#uses=1]35        ret i32 %tmp136}37 38define i32 @f3(i32 %a, i32 %b) {39entry:40; CHECK-THUMB: f341; CHECK-THUMB: __modsi342; CHECK-THUMBV7M: f343; CHECK-THUMBV7M: sdiv44; CHECK-HWDIV: f345; CHECK-HWDIV: sdiv46        %tmp1 = srem i32 %a, %b         ; <i32> [#uses=1]47        ret i32 %tmp148}49 50define i32 @f4(i32 %a, i32 %b) {51entry:52; CHECK-THUMB: f453; CHECK-THUMB: __umodsi354; CHECK-THUMBV7M: f455; CHECK-THUMBV7M: udiv56; CHECK-HWDIV: f457; CHECK-HWDIV: udiv58        %tmp1 = urem i32 %a, %b         ; <i32> [#uses=1]59        ret i32 %tmp160}61 62