Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Side by Side Diff: tests_lit/assembler/arm32/vsqrt.ll

Issue 1647113003: Add VSQRT instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Update DART files. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
23 declare float @llvm.sqrt.f32(float)
24 declare double @llvm.sqrt.f64(double)
25
26 define 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
40 define 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 }
OLDNEW
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698