1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -mcpu=mips32r5 -mattr=+msa,+fp64,+nan2008 -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=P5600
4 define void @fadd_v4f32(ptr %a, ptr %b, ptr %c) {
5 ; P5600-LABEL: fadd_v4f32:
6 ; P5600: # %bb.0: # %entry
7 ; P5600-NEXT: ld.w $w0, 0($4)
8 ; P5600-NEXT: ld.w $w1, 0($5)
9 ; P5600-NEXT: fadd.w $w0, $w0, $w1
10 ; P5600-NEXT: st.w $w0, 0($6)
14 %0 = load <4 x float>, ptr %a, align 16
15 %1 = load <4 x float>, ptr %b, align 16
16 %add = fadd <4 x float> %0, %1
17 store <4 x float> %add, ptr %c, align 16
22 define void @fadd_v2f64(ptr %a, ptr %b, ptr %c) {
23 ; P5600-LABEL: fadd_v2f64:
24 ; P5600: # %bb.0: # %entry
25 ; P5600-NEXT: ld.d $w0, 0($4)
26 ; P5600-NEXT: ld.d $w1, 0($5)
27 ; P5600-NEXT: fadd.d $w0, $w0, $w1
28 ; P5600-NEXT: st.d $w0, 0($6)
32 %0 = load <2 x double>, ptr %a, align 16
33 %1 = load <2 x double>, ptr %b, align 16
34 %add = fadd <2 x double> %0, %1
35 store <2 x double> %add, ptr %c, align 16
40 define void @fsub_v4f32(ptr %a, ptr %b, ptr %c) {
41 ; P5600-LABEL: fsub_v4f32:
42 ; P5600: # %bb.0: # %entry
43 ; P5600-NEXT: ld.w $w0, 0($4)
44 ; P5600-NEXT: ld.w $w1, 0($5)
45 ; P5600-NEXT: fsub.w $w0, $w0, $w1
46 ; P5600-NEXT: st.w $w0, 0($6)
50 %0 = load <4 x float>, ptr %a, align 16
51 %1 = load <4 x float>, ptr %b, align 16
52 %sub = fsub <4 x float> %0, %1
53 store <4 x float> %sub, ptr %c, align 16
58 define void @fsub_v2f64(ptr %a, ptr %b, ptr %c) {
59 ; P5600-LABEL: fsub_v2f64:
60 ; P5600: # %bb.0: # %entry
61 ; P5600-NEXT: ld.d $w0, 0($4)
62 ; P5600-NEXT: ld.d $w1, 0($5)
63 ; P5600-NEXT: fsub.d $w0, $w0, $w1
64 ; P5600-NEXT: st.d $w0, 0($6)
68 %0 = load <2 x double>, ptr %a, align 16
69 %1 = load <2 x double>, ptr %b, align 16
70 %sub = fsub <2 x double> %0, %1
71 store <2 x double> %sub, ptr %c, align 16
76 define void @fmul_v4f32(ptr %a, ptr %b, ptr %c) {
77 ; P5600-LABEL: fmul_v4f32:
78 ; P5600: # %bb.0: # %entry
79 ; P5600-NEXT: ld.w $w0, 0($4)
80 ; P5600-NEXT: ld.w $w1, 0($5)
81 ; P5600-NEXT: fmul.w $w0, $w0, $w1
82 ; P5600-NEXT: st.w $w0, 0($6)
86 %0 = load <4 x float>, ptr %a, align 16
87 %1 = load <4 x float>, ptr %b, align 16
88 %mul = fmul <4 x float> %0, %1
89 store <4 x float> %mul, ptr %c, align 16
94 define void @fmul_v2f64(ptr %a, ptr %b, ptr %c) {
95 ; P5600-LABEL: fmul_v2f64:
96 ; P5600: # %bb.0: # %entry
97 ; P5600-NEXT: ld.d $w0, 0($4)
98 ; P5600-NEXT: ld.d $w1, 0($5)
99 ; P5600-NEXT: fmul.d $w0, $w0, $w1
100 ; P5600-NEXT: st.d $w0, 0($6)
104 %0 = load <2 x double>, ptr %a, align 16
105 %1 = load <2 x double>, ptr %b, align 16
106 %mul = fmul <2 x double> %0, %1
107 store <2 x double> %mul, ptr %c, align 16
112 define void @fdiv_v4f32(ptr %a, ptr %b, ptr %c) {
113 ; P5600-LABEL: fdiv_v4f32:
114 ; P5600: # %bb.0: # %entry
115 ; P5600-NEXT: ld.w $w0, 0($4)
116 ; P5600-NEXT: ld.w $w1, 0($5)
117 ; P5600-NEXT: fdiv.w $w0, $w0, $w1
118 ; P5600-NEXT: st.w $w0, 0($6)
122 %0 = load <4 x float>, ptr %a, align 16
123 %1 = load <4 x float>, ptr %b, align 16
124 %div = fdiv <4 x float> %0, %1
125 store <4 x float> %div, ptr %c, align 16
130 define void @fdiv_v2f64(ptr %a, ptr %b, ptr %c) {
131 ; P5600-LABEL: fdiv_v2f64:
132 ; P5600: # %bb.0: # %entry
133 ; P5600-NEXT: ld.d $w0, 0($4)
134 ; P5600-NEXT: ld.d $w1, 0($5)
135 ; P5600-NEXT: fdiv.d $w0, $w0, $w1
136 ; P5600-NEXT: st.d $w0, 0($6)
140 %0 = load <2 x double>, ptr %a, align 16
141 %1 = load <2 x double>, ptr %b, align 16
142 %div = fdiv <2 x double> %0, %1
143 store <2 x double> %div, ptr %c, align 16