1; Show that we can translate intrinsic vsqrt into a binary instruction. 2 3; REQUIRES: allow_dump 4 5; Compile using standalone assembler. 6; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 -allow-extern \ 7; RUN: -reg-use s20,d20 | 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 -allow-extern -reg-use s20,d20 \ 12; RUN: | FileCheck %s --check-prefix=DIS 13 14; Compile using integrated assembler. 15; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 -allow-extern \ 16; RUN: -reg-use s20,d20 | 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 -allow-extern -reg-use s20,d20 \ 21; RUN: | FileCheck %s --check-prefix=DIS 22 23declare float @llvm.sqrt.f32(float) 24declare double @llvm.sqrt.f64(double) 25 26define internal float @sqrtFloat() { 27; ASM-LABEL: sqrtFloat: 28; DIS-LABEL: 00000000 <sqrtFloat>: 29; IASM-LABEL: sqrtFloat: 30 31 %v = call float @llvm.sqrt.f32(float 0.5); 32 33; ASM: vsqrt.f32 s20, s20 34; DIS: c: eeb1aaca 35; IASM-NOT: vsqrt.f32 36 37 ret float %v 38} 39 40define internal double @sqrtDouble() { 41; ASM-LABEL: sqrtDouble: 42; DIS-LABEL: 00000030 <sqrtDouble>: 43; IASM-LABEL: sqrtDouble: 44 45 %v = call double @llvm.sqrt.f64(double 0.5); 46 47; ASM: vsqrt.f64 d20, d20 48; DIS: 38: eef14be4 49; IASM-NOT: vsqrt.f64 50 51 ret double %v 52} 53