1 ; Show that we can move between float (S) and integer (GPR) registers. 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,r5,r6 | 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,r5,r6 | 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,r5,r6 \ 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,r5,r6 | FileCheck %s --check-prefix=DIS 21 22 define internal void @FloatToI1() { 23 ; ASM-LABEL: FloatToI1: 24 ; DIS-LABEL: {{.+}} <FloatToI1>: 25 26 %v = fptoui float 0.0 to i1 27 28 ; ASM: vmov r5, s20 29 ; DIS: {{.+}}: ee1a5a10 30 ; IASM-NOT: vmov 31 32 ret void 33 } 34 35 define internal void @FloatToI8() { 36 ; ASM-LABEL: FloatToI8: 37 ; DIS-LABEL: {{.+}} <FloatToI8>: 38 39 %v = fptoui float 0.0 to i8 40 41 ; ASM: vmov r5, s20 42 ; DIS: {{.+}}: ee1a5a10 43 ; IASM-NOT: vmov 44 45 ret void 46 } 47 48 define internal void @FloatToI16() { 49 ; ASM-LABEL: FloatToI16: 50 ; DIS-LABEL: {{.+}} <FloatToI16>: 51 52 %v = fptoui float 0.0 to i16 53 54 ; ASM: vmov r5, s20 55 ; DIS: {{.+}}: ee1a5a10 56 ; IASM-NOT: vmov 57 58 ret void 59 } 60 61 define internal void @FloatToI32() { 62 ; ASM-LABEL: FloatToI32: 63 ; DIS-LABEL: {{.+}} <FloatToI32>: 64 65 %v = fptoui float 0.0 to i32 66 67 ; ASM: vmov r5, s20 68 ; DIS: {{.+}}: ee1a5a10 69 ; IASM-NOT: vmov 70 71 ret void 72 } 73 74 define internal float @I1ToFloat() { 75 ; ASM-LABEL: I1ToFloat: 76 ; DIS-LABEL: {{.+}} <I1ToFloat>: 77 78 %v = uitofp i1 1 to float 79 80 ; ASM: vmov s20, r5 81 ; DIS: {{.+}}: ee0a5a10 82 ; IASM-NOT: vmov 83 84 ret float %v 85 } 86 87 define internal float @I8ToFloat() { 88 ; ASM-LABEL: I8ToFloat: 89 ; DIS-LABEL: {{.+}} <I8ToFloat>: 90 91 %v = uitofp i8 1 to float 92 93 ; ASM: vmov s20, r5 94 ; DIS: {{.+}}: ee0a5a10 95 ; IASM-NOT: vmov 96 97 ret float %v 98 } 99 100 define internal float @I16ToFloat() { 101 ; ASM-LABEL: I16ToFloat: 102 ; DIS-LABEL: {{.+}} <I16ToFloat>: 103 104 %v = uitofp i16 1 to float 105 106 ; ASM: vmov s20, r5 107 ; DIS: {{.+}}: ee0a5a10 108 ; IASM-NOT: vmov 109 110 ret float %v 111 } 112 113 define internal float @I32ToFloat() { 114 ; ASM-LABEL: I32ToFloat: 115 ; DIS-LABEL: {{.+}} <I32ToFloat>: 116 117 %v = uitofp i32 17 to float 118 119 ; ASM: vmov s20, r5 120 ; DIS: {{.+}}: ee0a5a10 121 ; IASM-NOT: vmov 122 123 ret float %v 124 } 125