1; Show that we know how to move between floating point registers. 2 3; NOTE: We use the select instruction to fire this in -Om1, since a 4; vmovne is generated (after a branch) to (conditionally) assign the 5; else value. 6 7; REQUIRES: allow_dump 8 9; Compile using standalone assembler. 10; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ 11; RUN: -reg-use s20,s22,d20,d22 \ 12; RUN: | FileCheck %s --check-prefix=ASM 13 14; Show bytes in assembled standalone code. 15; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 16; RUN: --args -Om1 \ 17; RUN: -reg-use s20,s22,d20,d22 \ 18; RUN: | FileCheck %s --check-prefix=DIS 19 20; Compile using integrated assembler. 21; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \ 22; RUN: -reg-use s20,s22,d20,d22 \ 23; RUN: | FileCheck %s --check-prefix=IASM 24 25; Show bytes in assembled integrated code. 26; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 27; RUN: --args -Om1 \ 28; RUN: -reg-use s20,s22,d20,d22 \ 29; RUN: | FileCheck %s --check-prefix=DIS 30 31define internal float @moveFloat() { 32; ASM-LABEL: moveFloat: 33; DIS-LABEL: 00000000 <moveFloat>: 34; IASM-LABEL: moveFloat: 35 36 %v = select i1 true, float 0.5, float 1.5 37 38; ASM: vmovne.f32 s20, s22 39; DIS: 1c: 1eb0aa4b 40; IASM-NOT: vmovnew.f32 41 42 ret float %v 43} 44 45define internal double @moveDouble() { 46; ASM-LABEL: moveDouble: 47; DIS-LABEL: 00000040 <moveDouble>: 48; IASM-LABEL: moveDouble: 49 50 %v = select i1 true, double 0.5, double 1.5 51 52; ASM: vmovne.f64 d20, d22 53; DIS: 54: 1ef04b66 54; IASM-NOT: vmovne.f64 55 56 ret double %v 57} 58