| OLD | NEW |
| 1 ; Show that we know how to translate converting float to signed integer. | 1 ; Show that we know how to translate converting double to unsigned integer. |
| 2 | 2 |
| 3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
| 4 | 4 |
| 5 ; Compile using standalone assembler. | 5 ; Compile using standalone assembler. |
| 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
| 7 ; RUN: --reg-use=s20 | FileCheck %s --check-prefix=ASM | 7 ; RUN: --reg-use=s20 | FileCheck %s --check-prefix=ASM |
| 8 | 8 |
| 9 ; Show bytes in assembled standalone code. | 9 ; Show bytes in assembled standalone code. |
| 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
| 11 ; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS | 11 ; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS |
| 12 | 12 |
| 13 ; Compile using integrated assembler. | 13 ; Compile using integrated assembler. |
| 14 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ | 14 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ |
| 15 ; RUN: --reg-use=s20 \ | 15 ; RUN: --reg-use=s20 \ |
| 16 ; RUN: | FileCheck %s --check-prefix=IASM | 16 ; RUN: | FileCheck %s --check-prefix=IASM |
| 17 | 17 |
| 18 ; Show bytes in assembled integrated code. | 18 ; Show bytes in assembled integrated code. |
| 19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | 19 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ |
| 20 ; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS | 20 ; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS |
| 21 | 21 |
| 22 define internal i32 @FloatToSignedInt() { | 22 define internal i32 @DoubleToUnsignedInt() { |
| 23 ; ASM-LABEL: FloatToSignedInt: | 23 ; ASM-LABEL: DoubleToUnsignedInt: |
| 24 ; DIS-LABEL: 00000000 <FloatToSignedInt>: | 24 ; DIS-LABEL: 00000000 <DoubleToUnsignedInt>: |
| 25 ; IASM-LABEL: FloatToSignedInt: | |
| 26 | 25 |
| 27 entry: | 26 entry: |
| 28 ; ASM-NEXT: .LFloatToSignedInt$entry: | 27 ; ASM: .LDoubleToUnsignedInt$entry: |
| 29 ; IASM-NEXT: .LFloatToSignedInt$entry: | |
| 30 | 28 |
| 31 %v = fptosi float 0.0 to i32 | 29 %v = fptoui double 0.0 to i32 |
| 32 | 30 |
| 33 ; ASM: vcvt.s32.f32 s20, s20 | 31 ; ASM: vcvt.u32.f64 s20, d0 |
| 34 ; DIS: 14: eebdaaca | 32 ; DIS: c: eebcabc0 |
| 35 ; IASM-NOT: vcvt | 33 ; IASM-NOT: vcvt |
| 36 | 34 |
| 37 ret i32 %v | 35 ret i32 %v |
| 38 } | 36 } |
| OLD | NEW |