@@ -16,3 +16,45 @@ entry:
1616 %cond = tail call float @llvm.maximumnum.f32 (float %a , float %b )
1717 ret float %cond
1818}
19+
20+ define { float , float } @struct ({ float , float } nofpclass(nan) %a ) {
21+ ; MIPS32R6-LABEL: struct:
22+ ; MIPS32R6: # %bb.0:
23+ ; MIPS32R6-NEXT: mov.s $f2, $f14
24+ ; MIPS32R6-NEXT: jr $ra
25+ ; MIPS32R6-NEXT: mov.s $f0, $f12
26+ ;
27+ ; MIPS64R6-LABEL: struct:
28+ ; MIPS64R6: # %bb.0:
29+ ; MIPS64R6-NEXT: mov.s $f2, $f13
30+ ; MIPS64R6-NEXT: jr $ra
31+ ; MIPS64R6-NEXT: mov.s $f0, $f12
32+ ret {float , float } %a
33+ }
34+
35+ %struct.f2 = type { float , float }
36+ define %struct.f2 @m ([2 x float ] nofpclass(nan) %a0 , [2 x float ] nofpclass(nan) %a1 ) {
37+ ; MIPS32R6-LABEL: m:
38+ ; MIPS32R6: # %bb.0: # %entry
39+ ; MIPS32R6-NEXT: mtc1 $6, $f0
40+ ; MIPS32R6-NEXT: max.s $f0, $f12, $f0
41+ ; MIPS32R6-NEXT: mtc1 $7, $f1
42+ ; MIPS32R6-NEXT: jr $ra
43+ ; MIPS32R6-NEXT: max.s $f2, $f14, $f1
44+ ;
45+ ; MIPS64R6-LABEL: m:
46+ ; MIPS64R6: # %bb.0: # %entry
47+ ; MIPS64R6-NEXT: max.s $f0, $f12, $f14
48+ ; MIPS64R6-NEXT: jr $ra
49+ ; MIPS64R6-NEXT: max.s $f2, $f13, $f15
50+ entry:
51+ %a0f0 = extractvalue [2 x float ] %a0 , 0
52+ %a0f1 = extractvalue [2 x float ] %a0 , 1
53+ %a1f0 = extractvalue [2 x float ] %a1 , 0
54+ %a1f1 = extractvalue [2 x float ] %a1 , 1
55+ %max0 = tail call float @llvm.maximumnum.f32 (float %a0f0 , float %a1f0 )
56+ %max1 = tail call float @llvm.maximumnum.f32 (float %a0f1 , float %a1f1 )
57+ %ret0 = insertvalue %struct.f2 poison, float %max0 , 0
58+ %ret1 = insertvalue %struct.f2 %ret0 , float %max1 , 1
59+ ret %struct.f2 %ret1
60+ }
0 commit comments