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

Side by Side Diff: tests_lit/llvm2ice_tests/fp.arith.ll

Issue 1266263003: Add the ARM32 FP register table entries, simple arith, and args. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: format more Created 5 years, 4 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/IceTargetLoweringARM32.cpp ('k') | tests_lit/llvm2ice_tests/fp.call_ret.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; This tries to be a comprehensive test of f32 and f64 arith operations.
2 ; The CHECK lines are only checking for basic instruction patterns
3 ; that should be present regardless of the optimization level, so
4 ; there are no special OPTM1 match lines.
5
6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
7 ; RUN: --target x8632 -i %s --args -O2 \
8 ; RUN: | %if --need=target_X8632 --command FileCheck %s
9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target x8632 -i %s --args -Om1 \
11 ; RUN: | %if --need=target_X8632 --command FileCheck %s
12
13 ; RUN: %if --need=target_ARM32 --need=allow_dump \
14 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \
15 ; RUN: -i %s --args -O2 --skip-unimplemented \
16 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
17 ; RUN: --command FileCheck --check-prefix ARM32 %s
18 ; RUN: %if --need=target_ARM32 --need=allow_dump \
19 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \
20 ; RUN: -i %s --args -Om1 --skip-unimplemented \
21 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
22 ; RUN: --command FileCheck --check-prefix ARM32 %s
23
24 define internal float @addFloat(float %a, float %b) {
25 entry:
26 %add = fadd float %a, %b
27 ret float %add
28 }
29 ; CHECK-LABEL: addFloat
30 ; CHECK: addss
31 ; CHECK: fld
32 ; ARM32-LABEL: addFloat
33 ; ARM32: vadd.f32 s{{[0-9]+}}, s
34
35 define internal double @addDouble(double %a, double %b) {
36 entry:
37 %add = fadd double %a, %b
38 ret double %add
39 }
40 ; CHECK-LABEL: addDouble
41 ; CHECK: addsd
42 ; CHECK: fld
43 ; ARM32-LABEL: addDouble
44 ; ARM32: vadd.f64 d{{[0-9]+}}, d
45
46 define internal float @subFloat(float %a, float %b) {
47 entry:
48 %sub = fsub float %a, %b
49 ret float %sub
50 }
51 ; CHECK-LABEL: subFloat
52 ; CHECK: subss
53 ; CHECK: fld
54 ; ARM32-LABEL: subFloat
55 ; ARM32: vsub.f32 s{{[0-9]+}}, s
56
57 define internal double @subDouble(double %a, double %b) {
58 entry:
59 %sub = fsub double %a, %b
60 ret double %sub
61 }
62 ; CHECK-LABEL: subDouble
63 ; CHECK: subsd
64 ; CHECK: fld
65 ; ARM32-LABEL: subDouble
66 ; ARM32: vsub.f64 d{{[0-9]+}}, d
67
68 define internal float @mulFloat(float %a, float %b) {
69 entry:
70 %mul = fmul float %a, %b
71 ret float %mul
72 }
73 ; CHECK-LABEL: mulFloat
74 ; CHECK: mulss
75 ; CHECK: fld
76 ; ARM32-LABEL: mulFloat
77 ; ARM32: vmul.f32 s{{[0-9]+}}, s
78
79 define internal double @mulDouble(double %a, double %b) {
80 entry:
81 %mul = fmul double %a, %b
82 ret double %mul
83 }
84 ; CHECK-LABEL: mulDouble
85 ; CHECK: mulsd
86 ; CHECK: fld
87 ; ARM32-LABEL: mulDouble
88 ; ARM32: vmul.f64 d{{[0-9]+}}, d
89
90 define internal float @divFloat(float %a, float %b) {
91 entry:
92 %div = fdiv float %a, %b
93 ret float %div
94 }
95 ; CHECK-LABEL: divFloat
96 ; CHECK: divss
97 ; CHECK: fld
98 ; ARM32-LABEL: divFloat
99 ; ARM32: vdiv.f32 s{{[0-9]+}}, s
100
101 define internal double @divDouble(double %a, double %b) {
102 entry:
103 %div = fdiv double %a, %b
104 ret double %div
105 }
106 ; CHECK-LABEL: divDouble
107 ; CHECK: divsd
108 ; CHECK: fld
109 ; ARM32-LABEL: divDouble
110 ; ARM32: vdiv.f64 d{{[0-9]+}}, d
111
112 define internal float @remFloat(float %a, float %b) {
113 entry:
114 %div = frem float %a, %b
115 ret float %div
116 }
117 ; CHECK-LABEL: remFloat
118 ; CHECK: call {{.*}} R_{{.*}} fmodf
119 ; ARM32-LABEL: remFloat
120 ; ARM32: bl {{.*}} fmodf
121
122 define internal double @remDouble(double %a, double %b) {
123 entry:
124 %div = frem double %a, %b
125 ret double %div
126 }
127 ; CHECK-LABEL: remDouble
128 ; CHECK: call {{.*}} R_{{.*}} fmod
129 ; ARM32-LABEL: remDouble
130 ; ARM32: bl {{.*}} fmod
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | tests_lit/llvm2ice_tests/fp.call_ret.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698