| OLD | NEW |
| (Empty) | |
| 1 ; Show that we translate intrinsics for fabs on float and double. |
| 2 |
| 3 ; REQUIRES: allow_dump |
| 4 |
| 5 ; Compile using standalone assembler. |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 7 ; RUN: -reg-use s20,d22 \ |
| 8 ; RUN: | FileCheck %s --check-prefix=ASM |
| 9 |
| 10 ; Show bytes in assembled standalone code. |
| 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 12 ; RUN: --args -Om1 \ |
| 13 ; RUN: -reg-use s20,d22 \ |
| 14 ; RUN: | FileCheck %s --check-prefix=DIS |
| 15 |
| 16 ; Compile using integrated assembler. |
| 17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ |
| 18 ; RUN: -reg-use s20,d22 \ |
| 19 ; RUN: | FileCheck %s --check-prefix=IASM |
| 20 |
| 21 ; Show bytes in assembled integrated code. |
| 22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 23 ; RUN: --args -Om1 \ |
| 24 ; RUN: -reg-use s20,d22 \ |
| 25 ; RUN: | FileCheck %s --check-prefix=DIS |
| 26 |
| 27 declare float @llvm.fabs.f32(float) |
| 28 declare double @llvm.fabs.f64(double) |
| 29 |
| 30 define internal float @test_fabs_float(float %x) { |
| 31 ; ASM-LABEL: test_fabs_float: |
| 32 ; DIS-LABEL: 00000000 <test_fabs_float>: |
| 33 ; IASM-LABEL: test_fabs_float: |
| 34 |
| 35 entry: |
| 36 %r = call float @llvm.fabs.f32(float %x) |
| 37 |
| 38 ; ASM: vabs.f32 s20, s20 |
| 39 ; DIS: 10: eeb0aaca |
| 40 ; IASM-NOT: vabs.f32 |
| 41 |
| 42 ret float %r |
| 43 } |
| 44 |
| 45 define internal double @test_fabs_double(double %x) { |
| 46 ; ASM-LABEL: test_fabs_double: |
| 47 ; DIS-LABEL: 00000030 <test_fabs_double>: |
| 48 ; IASM-LABEL: test_fabs_double: |
| 49 |
| 50 entry: |
| 51 %r = call double @llvm.fabs.f64(double %x) |
| 52 |
| 53 ; ASM: vabs.f64 d22, d22 |
| 54 ; DIS: 3c: eef06be6 |
| 55 ; IASM-NOT: vabs.64 |
| 56 |
| 57 ret double %r |
| 58 } |
| OLD | NEW |