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

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

Issue 1657193003: Add FABS intrinsic to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Format. 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
« no previous file with comments | « 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 translate intrinsics for fabs on float and double.
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,d22 \
8 ; RUN: | FileCheck %s --check-prefix=ASM
9
10 ; Show bytes in assembled standalone code.
11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
12 ; RUN: --args -Om1 \
13 ; RUN: -reg-use s20,d22 \
14 ; RUN: | FileCheck %s --check-prefix=DIS
15
16 ; Compile using integrated assembler.
17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
18 ; RUN: -reg-use s20,d22 \
19 ; RUN: | FileCheck %s --check-prefix=IASM
20
21 ; Show bytes in assembled integrated code.
22 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
23 ; RUN: --args -Om1 \
24 ; RUN: -reg-use s20,d22 \
25 ; RUN: | FileCheck %s --check-prefix=DIS
26
27 declare float @llvm.fabs.f32(float)
28 declare double @llvm.fabs.f64(double)
29
30 define internal float @test_fabs_float(float %x) {
31 ; ASM-LABEL: test_fabs_float:
32 ; DIS-LABEL: 00000000 <test_fabs_float>:
33 ; IASM-LABEL: test_fabs_float:
34
35 entry:
36 %r = call float @llvm.fabs.f32(float %x)
37
38 ; ASM: vabs.f32 s20, s20
39 ; DIS: 10: eeb0aaca
40 ; IASM-NOT: vabs.f32
41
42 ret float %r
43 }
44
45 define internal double @test_fabs_double(double %x) {
46 ; ASM-LABEL: test_fabs_double:
47 ; DIS-LABEL: 00000030 <test_fabs_double>:
48 ; IASM-LABEL: test_fabs_double:
49
50 entry:
51 %r = call double @llvm.fabs.f64(double %x)
52
53 ; ASM: vabs.f64 d22, d22
54 ; DIS: 3c: eef06be6
55 ; IASM-NOT: vabs.64
56
57 ret double %r
58 }
OLDNEW
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698