no-sse-win64.ll
3.33 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-windows-msvc < %s -mattr=-sse | FileCheck %s
; RUN: llc -mtriple=x86_64-windows-gnu < %s -mattr=-sse | FileCheck %s
define void @recv_double(double %v, double* %p) {
; CHECK-LABEL: recv_double:
; CHECK: # %bb.0:
; CHECK-NEXT: movq %rcx, (%rdx)
; CHECK-NEXT: retq
store double %v, double* %p
ret void
}
define void @recv_float(float %v, float* %p) {
; CHECK-LABEL: recv_float:
; CHECK: # %bb.0:
; CHECK-NEXT: movl %ecx, (%rdx)
; CHECK-NEXT: retq
store float %v, float* %p
ret void
}
define dso_local double @ret_double(double* %p) {
; CHECK-LABEL: ret_double:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movq (%rcx), %rax
; CHECK-NEXT: retq
entry:
%v = load double, double* %p
ret double %v
}
define dso_local float @ret_float(float* %p) {
; CHECK-LABEL: ret_float:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl (%rcx), %eax
; CHECK-NEXT: retq
entry:
%v = load float, float* %p
ret float %v
}
declare void @take_double(double)
declare void @take_float(float)
define void @pass_double(double* %p) {
; CHECK-LABEL: pass_double:
; CHECK: # %bb.0:
; CHECK-NEXT: subq $40, %rsp
; CHECK-NEXT: .seh_stackalloc 40
; CHECK-NEXT: .seh_endprologue
; CHECK-NEXT: movq (%rcx), %rcx
; CHECK-NEXT: callq take_double
; CHECK-NEXT: nop
; CHECK-NEXT: addq $40, %rsp
; CHECK-NEXT: retq
; CHECK-NEXT: .seh_handlerdata
; CHECK-NEXT: .text
; CHECK-NEXT: .seh_endproc
%v = load double, double* %p
call void @take_double(double %v)
ret void
}
define void @pass_float(float* %p) {
; CHECK-LABEL: pass_float:
; CHECK: # %bb.0:
; CHECK-NEXT: subq $40, %rsp
; CHECK-NEXT: .seh_stackalloc 40
; CHECK-NEXT: .seh_endprologue
; CHECK-NEXT: movl (%rcx), %ecx
; CHECK-NEXT: callq take_float
; CHECK-NEXT: nop
; CHECK-NEXT: addq $40, %rsp
; CHECK-NEXT: retq
; CHECK-NEXT: .seh_handlerdata
; CHECK-NEXT: .text
; CHECK-NEXT: .seh_endproc
%v = load float, float* %p
call void @take_float(float %v)
ret void
}
declare double @produce_double()
declare float @produce_float()
define void @call_double(double* %p) {
; CHECK-LABEL: call_double:
; CHECK: # %bb.0:
; CHECK-NEXT: pushq %rsi
; CHECK-NEXT: .seh_pushreg %rsi
; CHECK-NEXT: subq $32, %rsp
; CHECK-NEXT: .seh_stackalloc 32
; CHECK-NEXT: .seh_endprologue
; CHECK-NEXT: movq %rcx, %rsi
; CHECK-NEXT: callq produce_double
; CHECK-NEXT: movq %rax, (%rsi)
; CHECK-NEXT: addq $32, %rsp
; CHECK-NEXT: popq %rsi
; CHECK-NEXT: retq
; CHECK-NEXT: .seh_handlerdata
; CHECK-NEXT: .text
; CHECK-NEXT: .seh_endproc
%v = call double @produce_double()
store double %v, double* %p
ret void
}
define void @call_float(float* %p) {
; CHECK-LABEL: call_float:
; CHECK: # %bb.0:
; CHECK-NEXT: pushq %rsi
; CHECK-NEXT: .seh_pushreg %rsi
; CHECK-NEXT: subq $32, %rsp
; CHECK-NEXT: .seh_stackalloc 32
; CHECK-NEXT: .seh_endprologue
; CHECK-NEXT: movq %rcx, %rsi
; CHECK-NEXT: callq produce_float
; CHECK-NEXT: movl %eax, (%rsi)
; CHECK-NEXT: addq $32, %rsp
; CHECK-NEXT: popq %rsi
; CHECK-NEXT: retq
; CHECK-NEXT: .seh_handlerdata
; CHECK-NEXT: .text
; CHECK-NEXT: .seh_endproc
%v = call float @produce_float()
store float %v, float* %p
ret void
}