@@ -12,6 +12,7 @@ define float @float_in_fpr(float %a, float %b) {
12
12
; FP32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
13
13
; FP32-NEXT: $f0 = COPY [[COPY1]](s32)
14
14
; FP32-NEXT: RetRA implicit $f0
15
+ ;
15
16
; FP64-LABEL: name: float_in_fpr
16
17
; FP64: bb.1.entry:
17
18
; FP64-NEXT: liveins: $f12, $f14
@@ -33,6 +34,7 @@ define double @double_in_fpr(double %a, double %b) {
33
34
; FP32-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
34
35
; FP32-NEXT: $d0 = COPY [[COPY1]](s64)
35
36
; FP32-NEXT: RetRA implicit $d0
37
+ ;
36
38
; FP64-LABEL: name: double_in_fpr
37
39
; FP64: bb.1.entry:
38
40
; FP64-NEXT: liveins: $d12_64, $d14_64
@@ -54,6 +56,7 @@ define float @float_in_gpr(i32 %a, float %b) {
54
56
; FP32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
55
57
; FP32-NEXT: $f0 = COPY [[COPY1]](s32)
56
58
; FP32-NEXT: RetRA implicit $f0
59
+ ;
57
60
; FP64-LABEL: name: float_in_gpr
58
61
; FP64: bb.1.entry:
59
62
; FP64-NEXT: liveins: $a0, $a1
@@ -77,6 +80,7 @@ define double @double_in_gpr(i32 %a, double %b) {
77
80
; FP32-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY1]](s32), [[COPY2]](s32)
78
81
; FP32-NEXT: $d0 = COPY [[MV]](s64)
79
82
; FP32-NEXT: RetRA implicit $d0
83
+ ;
80
84
; FP64-LABEL: name: double_in_gpr
81
85
; FP64: bb.1.entry:
82
86
; FP64-NEXT: liveins: $a0, $a2, $a3
@@ -91,6 +95,36 @@ entry:
91
95
ret double %b
92
96
}
93
97
98
+ define double @two_double_in_gpr (i32 %a , double %b , double %c ) {
99
+ ; FP32-LABEL: name: two_double_in_gpr
100
+ ; FP32: bb.1.entry:
101
+ ; FP32-NEXT: liveins: $a0, $a2, $a3
102
+ ; FP32-NEXT: {{ $}}
103
+ ; FP32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
104
+ ; FP32-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a2
105
+ ; FP32-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a3
106
+ ; FP32-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY1]](s32), [[COPY2]](s32)
107
+ ; FP32-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
108
+ ; FP32-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s64) from %fixed-stack.0)
109
+ ; FP32-NEXT: $d0 = COPY [[LOAD]](s64)
110
+ ; FP32-NEXT: RetRA implicit $d0
111
+ ;
112
+ ; FP64-LABEL: name: two_double_in_gpr
113
+ ; FP64: bb.1.entry:
114
+ ; FP64-NEXT: liveins: $a0, $a2, $a3
115
+ ; FP64-NEXT: {{ $}}
116
+ ; FP64-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
117
+ ; FP64-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $a2
118
+ ; FP64-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $a3
119
+ ; FP64-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY1]](s32), [[COPY2]](s32)
120
+ ; FP64-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
121
+ ; FP64-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s64) from %fixed-stack.0)
122
+ ; FP64-NEXT: $d0_64 = COPY [[LOAD]](s64)
123
+ ; FP64-NEXT: RetRA implicit $d0_64
124
+ entry:
125
+ ret double %c
126
+ }
127
+
94
128
define float @call_float_in_fpr (float %a , float %b ) {
95
129
; FP32-LABEL: name: call_float_in_fpr
96
130
; FP32: bb.1.entry:
@@ -106,6 +140,7 @@ define float @call_float_in_fpr(float %a, float %b) {
106
140
; FP32-NEXT: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
107
141
; FP32-NEXT: $f0 = COPY [[COPY2]](s32)
108
142
; FP32-NEXT: RetRA implicit $f0
143
+ ;
109
144
; FP64-LABEL: name: call_float_in_fpr
110
145
; FP64: bb.1.entry:
111
146
; FP64-NEXT: liveins: $f12, $f14
@@ -140,6 +175,7 @@ define double @call_double_in_fpr(double %a, double %b) {
140
175
; FP32-NEXT: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
141
176
; FP32-NEXT: $d0 = COPY [[COPY2]](s64)
142
177
; FP32-NEXT: RetRA implicit $d0
178
+ ;
143
179
; FP64-LABEL: name: call_double_in_fpr
144
180
; FP64: bb.1.entry:
145
181
; FP64-NEXT: liveins: $d12_64, $d14_64
@@ -174,6 +210,7 @@ define float @call_float_in_gpr(i32 %a, float %b) {
174
210
; FP32-NEXT: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
175
211
; FP32-NEXT: $f0 = COPY [[COPY2]](s32)
176
212
; FP32-NEXT: RetRA implicit $f0
213
+ ;
177
214
; FP64-LABEL: name: call_float_in_gpr
178
215
; FP64: bb.1.entry:
179
216
; FP64-NEXT: liveins: $a0, $a1
@@ -213,6 +250,7 @@ define double @call_double_in_gpr(i32 %a, double %b) {
213
250
; FP32-NEXT: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
214
251
; FP32-NEXT: $d0 = COPY [[COPY3]](s64)
215
252
; FP32-NEXT: RetRA implicit $d0
253
+ ;
216
254
; FP64-LABEL: name: call_double_in_gpr
217
255
; FP64: bb.1.entry:
218
256
; FP64-NEXT: liveins: $a0, $a2, $a3
0 commit comments