OLD | NEW |
(Empty) | |
| 1 ; RUN: llc -mtriple armv7a-linux-gnueabihf < %s -o - \ |
| 2 ; RUN: | FileCheck %s --check-prefix=EABI |
| 3 ; RUN: llc -mtriple armv7a-linux-gnueabihf < %s -o - \ |
| 4 ; RUN: -arm-enable-aeabi-functions=0 | FileCheck %s --check-prefix=NO_EABI |
| 5 ; RUN: llc -mtriple armv7a-none-nacl-gnueabihf < %s -o - \ |
| 6 ; RUN: | FileCheck %s --check-prefix=NO_EABI |
| 7 |
| 8 ; PNaCl's build of compiler-rt (libgcc.a) does not define __aeabi_* |
| 9 ; functions for ARM yet. Test that the backend can avoid using these |
| 10 ; __aeabi_* functions. |
| 11 |
| 12 define i64 @do_division(i64 %a, i64 %b) { |
| 13 %div = udiv i64 %a, %b |
| 14 ret i64 %div |
| 15 } |
| 16 ; EABI-LABEL: do_division: |
| 17 ; EABI: bl __aeabi_uldivmod |
| 18 ; NO_EABI-LABEL: do_division: |
| 19 ; NO_EABI: bl __udivdi3 |
| 20 |
| 21 |
| 22 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) |
| 23 |
| 24 ; __aeabi_memset() has two arguments swapped compared with the normal |
| 25 ; memset(), so check that both are handled correctly. |
| 26 define void @do_memset(i8* %addr) { |
| 27 call void @llvm.memset.p0i8.i32(i8* %addr, i8 255, i32 100, i32 0, i1 false) |
| 28 ret void |
| 29 } |
| 30 ; EABI-LABEL: do_memset: |
| 31 ; EABI: mov r1, #100 |
| 32 ; EABI: mov r2, #255 |
| 33 ; EABI: bl __aeabi_memset |
| 34 ; NO_EABI-LABEL: do_memset: |
| 35 ; NO_EABI: mov r1, #255 |
| 36 ; NO_EABI: mov r2, #100 |
| 37 ; NO_EABI: bl memset |
OLD | NEW |