1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
| ; RUN: llc -mtriple=armv7-apple-ios < %s | FileCheck %s
define swiftcc float @t1(float %a, float %b) {
entry:
; CHECK: t1
; CHECK-NOT: vmov
; CHECK: vadd.f32
%add = fadd float %a, %b
ret float %add
}
define swiftcc double @t2(double %a, double %b) {
entry:
; CHECK: t2
; CHECK-NOT: vmov
; CHECK: vadd.f64
%add = fadd double %a, %b
ret double %add
}
define swiftcc double @t9(double %d0, double %d1, double %d2, double %d3,
double %d4, double %d5, double %d6, double %d7, float %a, float %b) {
entry:
; CHECK-LABEL: t9:
; CHECK-NOT: vmov
; CHECK: vldr
%add = fadd float %a, %b
%conv = fpext float %add to double
ret double %conv
}
define swiftcc double @t10(double %d0, double %d1, double %d2, double %d3,
double %d4, double %d5, double %a, float %b, double %c) {
entry:
; CHECK-LABEL: t10:
; CHECK-NOT: vmov
; CHECK: vldr
%add = fadd double %a, %c
ret double %add
}
define swiftcc float @t11(double %d0, double %d1, double %d2, double %d3,
double %d4, double %d5, double %d6, float %a, double %b, float %c) {
entry:
; CHECK-LABEL: t11:
; CHECK: vldr
%add = fadd float %a, %c
ret float %add
}
define swiftcc double @t12(double %a, double %b) {
entry:
; CHECK-LABEL: t12:
; CHECK: vstr
%add = fadd double %a, %b
%sub = fsub double %a, %b
%call = tail call swiftcc double @x(double 0.000000e+00, double 0.000000e+00,
double 0.000000e+00, double 0.000000e+00, double 0.000000e+00,
double 0.000000e+00, double %add, float 0.000000e+00,
double %sub)
ret double %call
}
declare swiftcc double @x(double, double, double, double, double, double,
double, float, double)
attributes #0 = { readnone }
attributes #1 = { readonly }
|