• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Show that we know how to translate converting unsigned integer to 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 | FileCheck %s --check-prefix=ASM
8
9; Show bytes in assembled standalone code.
10; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
11; RUN:   --args -Om1 --reg-use=s20  | FileCheck %s --check-prefix=DIS
12
13; Compile using integrated assembler.
14; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
15; RUN:   --reg-use=s20 \
16; RUN:   | FileCheck %s --check-prefix=IASM
17
18; Show bytes in assembled integrated code.
19; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
20; RUN:   --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS
21
22define internal double @UnsignedIntToDouble() {
23; ASM-LABEL: UnsignedIntToDouble:
24; DIS-LABEL: 00000000 <UnsignedIntToDouble>:
25; IASM-LABEL: UnsignedIntToDouble:
26
27entry:
28; ASM: .LUnsignedIntToDouble$entry:
29; IASM: .LUnsignedIntToDouble$entry:
30
31  %v = uitofp i32 17 to double
32
33; ASM:  vcvt.f64.u32    d0, s20
34; DIS:   10:    eeb80b4a
35; IASM-NOT: vcvt
36
37  ret double %v
38}
39