| OLD | NEW |
| (Empty) | |
| 1 ; Show that we know how to translate vcvt between float and double. |
| 2 |
| 3 ; NOTE: We use -O2 to get rid of memory stores. |
| 4 |
| 5 ; REQUIRES: allow_dump |
| 6 |
| 7 ; Compile using standalone assembler. |
| 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ |
| 9 ; RUN: | FileCheck %s --check-prefix=ASM |
| 10 |
| 11 ; Show bytes in assembled standalone code. |
| 12 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 13 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS |
| 14 |
| 15 ; Compile using integrated assembler. |
| 16 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ |
| 17 ; RUN: | FileCheck %s --check-prefix=IASM |
| 18 |
| 19 ; Show bytes in assembled integrated code. |
| 20 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 21 ; RUN: --args -O2 | FileCheck %s --check-prefix=DIS |
| 22 |
| 23 define internal double @testVcvtFloatToDouble(float %v) { |
| 24 ; ASM-LABEL: testVcvtFloatToDouble: |
| 25 ; DIS-LABEL: 00000000 <testVcvtFloatToDouble>: |
| 26 ; IASM-LABEL: testVcvtFloatToDouble: |
| 27 |
| 28 entry: |
| 29 ; ASM-NEXT: .LtestVcvtFloatToDouble$entry: |
| 30 ; IASM-NEXT: .LtestVcvtFloatToDouble$entry: |
| 31 |
| 32 %res = fpext float %v to double |
| 33 |
| 34 ; ASM-NEXT: vcvt.f64.f32 d0, s0 |
| 35 ; DIS-NEXT: 0: eeb70ac0 |
| 36 ; IASM-NEXT: .byte 0xc0 |
| 37 ; IASM-NEXT: .byte 0xa |
| 38 ; IASM-NEXT: .byte 0xb7 |
| 39 ; IASM-NEXT: .byte 0xee |
| 40 |
| 41 ret double %res |
| 42 } |
| 43 |
| 44 define internal float @testVcvtDoubleToFloat(double %v) { |
| 45 ; ASM-LABEL: testVcvtDoubleToFloat: |
| 46 ; DIS-LABEL: 00000010 <testVcvtDoubleToFloat>: |
| 47 ; IASM-LABEL: testVcvtDoubleToFloat: |
| 48 |
| 49 entry: |
| 50 ; ASM-NEXT: .LtestVcvtDoubleToFloat$entry: |
| 51 ; IASM-NEXT: .LtestVcvtDoubleToFloat$entry: |
| 52 |
| 53 %res = fptrunc double %v to float |
| 54 ; ASM-NEXT: vcvt.f32.f64 s0, d0 |
| 55 ; DIS-NEXT: 10: eeb70bc0 |
| 56 ; IASM-NEXT: .byte 0xc0 |
| 57 ; IASM-NEXT: .byte 0xb |
| 58 ; IASM-NEXT: .byte 0xb7 |
| 59 ; IASM-NEXT: .byte 0xee |
| 60 |
| 61 ret float %res |
| 62 } |
| OLD | NEW |