• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test moving constants into VPF registers.
2
3; REQUIRES: allow_dump
4
5; Compile using standalone assembler.
6; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 -reg-use=d21,s20 \
7; RUN:   | 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=d21,s20 \
12; RUN:   | FileCheck %s --check-prefix=DIS
13
14; Compile using integrated assembler.
15; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -reg-use=d21,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=d21,s20 \
21; RUN:   | FileCheck %s --check-prefix=DIS
22
23define internal void @testMoveDouble() {
24; ASM-LABEL: testMoveDouble:
25; DIS-LABEL: 00000000 <testMoveDouble>:
26
27entry:
28  store double 1.5, double* undef, align 8
29
30; ASM:  vmov.f64        d21, #1.500000e+00
31; DIS:    4:    eef75b08
32; IASM-NOT: vmov.f64
33
34  ret void
35}
36
37define internal void @testMoveFloat() {
38; ASM-LABEL: testMoveFloat:
39; DIS-LABEL: 00000010 <testMoveFloat>:
40
41entry:
42  %addr = inttoptr i32 0 to float*
43  store float 1.5, float* %addr, align 4
44
45; ASM:  vmov.f32        s20, #1.500000e+00
46; DIS:   18:    eeb7aa08
47; IASM-NOT: vmov.f32
48
49  ret void
50}
51