1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -lower-matrix-intrinsics -S < %s | FileCheck %s
3 ; RUN: opt -passes='lower-matrix-intrinsics' -S < %s | FileCheck %s
5 define <4 x double> @multiply_right_transpose_2x2(<4 x double> %a, <4 x double> %b) {
6 ; CHECK-LABEL: @multiply_right_transpose_2x2(
8 ; CHECK-NEXT: [[SPLIT:%.*]] = shufflevector <4 x double> [[A:%.*]], <4 x double> poison, <2 x i32> <i32 0, i32 1>
9 ; CHECK-NEXT: [[SPLIT1:%.*]] = shufflevector <4 x double> [[A]], <4 x double> poison, <2 x i32> <i32 2, i32 3>
10 ; CHECK-NEXT: [[SPLIT2:%.*]] = shufflevector <4 x double> [[B:%.*]], <4 x double> poison, <2 x i32> <i32 0, i32 1>
11 ; CHECK-NEXT: [[SPLIT3:%.*]] = shufflevector <4 x double> [[B]], <4 x double> poison, <2 x i32> <i32 2, i32 3>
12 ; CHECK-NEXT: [[BLOCK:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> zeroinitializer
13 ; CHECK-NEXT: [[TMP0:%.*]] = extractelement <2 x double> [[SPLIT2]], i64 0
14 ; CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <1 x double> poison, double [[TMP0]], i32 0
15 ; CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT]], <1 x double> poison, <1 x i32> zeroinitializer
16 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <1 x double> [[BLOCK]], [[SPLAT_SPLAT]]
17 ; CHECK-NEXT: [[BLOCK4:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> zeroinitializer
18 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 0
19 ; CHECK-NEXT: [[SPLAT_SPLATINSERT5:%.*]] = insertelement <1 x double> poison, double [[TMP2]], i32 0
20 ; CHECK-NEXT: [[SPLAT_SPLAT6:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT5]], <1 x double> poison, <1 x i32> zeroinitializer
21 ; CHECK-NEXT: [[TMP3:%.*]] = fmul <1 x double> [[BLOCK4]], [[SPLAT_SPLAT6]]
22 ; CHECK-NEXT: [[TMP4:%.*]] = fadd <1 x double> [[TMP1]], [[TMP3]]
23 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <1 x double> [[TMP4]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
24 ; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <2 x double> undef, <2 x double> [[TMP5]], <2 x i32> <i32 2, i32 1>
25 ; CHECK-NEXT: [[BLOCK7:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> <i32 1>
26 ; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x double> [[SPLIT2]], i64 0
27 ; CHECK-NEXT: [[SPLAT_SPLATINSERT8:%.*]] = insertelement <1 x double> poison, double [[TMP7]], i32 0
28 ; CHECK-NEXT: [[SPLAT_SPLAT9:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT8]], <1 x double> poison, <1 x i32> zeroinitializer
29 ; CHECK-NEXT: [[TMP8:%.*]] = fmul <1 x double> [[BLOCK7]], [[SPLAT_SPLAT9]]
30 ; CHECK-NEXT: [[BLOCK10:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> <i32 1>
31 ; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 0
32 ; CHECK-NEXT: [[SPLAT_SPLATINSERT11:%.*]] = insertelement <1 x double> poison, double [[TMP9]], i32 0
33 ; CHECK-NEXT: [[SPLAT_SPLAT12:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT11]], <1 x double> poison, <1 x i32> zeroinitializer
34 ; CHECK-NEXT: [[TMP10:%.*]] = fmul <1 x double> [[BLOCK10]], [[SPLAT_SPLAT12]]
35 ; CHECK-NEXT: [[TMP11:%.*]] = fadd <1 x double> [[TMP8]], [[TMP10]]
36 ; CHECK-NEXT: [[TMP12:%.*]] = shufflevector <1 x double> [[TMP11]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
37 ; CHECK-NEXT: [[TMP13:%.*]] = shufflevector <2 x double> [[TMP6]], <2 x double> [[TMP12]], <2 x i32> <i32 0, i32 2>
38 ; CHECK-NEXT: [[BLOCK13:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> zeroinitializer
39 ; CHECK-NEXT: [[TMP14:%.*]] = extractelement <2 x double> [[SPLIT2]], i64 1
40 ; CHECK-NEXT: [[SPLAT_SPLATINSERT14:%.*]] = insertelement <1 x double> poison, double [[TMP14]], i32 0
41 ; CHECK-NEXT: [[SPLAT_SPLAT15:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT14]], <1 x double> poison, <1 x i32> zeroinitializer
42 ; CHECK-NEXT: [[TMP15:%.*]] = fmul <1 x double> [[BLOCK13]], [[SPLAT_SPLAT15]]
43 ; CHECK-NEXT: [[BLOCK16:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> zeroinitializer
44 ; CHECK-NEXT: [[TMP16:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 1
45 ; CHECK-NEXT: [[SPLAT_SPLATINSERT17:%.*]] = insertelement <1 x double> poison, double [[TMP16]], i32 0
46 ; CHECK-NEXT: [[SPLAT_SPLAT18:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT17]], <1 x double> poison, <1 x i32> zeroinitializer
47 ; CHECK-NEXT: [[TMP17:%.*]] = fmul <1 x double> [[BLOCK16]], [[SPLAT_SPLAT18]]
48 ; CHECK-NEXT: [[TMP18:%.*]] = fadd <1 x double> [[TMP15]], [[TMP17]]
49 ; CHECK-NEXT: [[TMP19:%.*]] = shufflevector <1 x double> [[TMP18]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
50 ; CHECK-NEXT: [[TMP20:%.*]] = shufflevector <2 x double> undef, <2 x double> [[TMP19]], <2 x i32> <i32 2, i32 1>
51 ; CHECK-NEXT: [[BLOCK19:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> <i32 1>
52 ; CHECK-NEXT: [[TMP21:%.*]] = extractelement <2 x double> [[SPLIT2]], i64 1
53 ; CHECK-NEXT: [[SPLAT_SPLATINSERT20:%.*]] = insertelement <1 x double> poison, double [[TMP21]], i32 0
54 ; CHECK-NEXT: [[SPLAT_SPLAT21:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT20]], <1 x double> poison, <1 x i32> zeroinitializer
55 ; CHECK-NEXT: [[TMP22:%.*]] = fmul <1 x double> [[BLOCK19]], [[SPLAT_SPLAT21]]
56 ; CHECK-NEXT: [[BLOCK22:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> <i32 1>
57 ; CHECK-NEXT: [[TMP23:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 1
58 ; CHECK-NEXT: [[SPLAT_SPLATINSERT23:%.*]] = insertelement <1 x double> poison, double [[TMP23]], i32 0
59 ; CHECK-NEXT: [[SPLAT_SPLAT24:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT23]], <1 x double> poison, <1 x i32> zeroinitializer
60 ; CHECK-NEXT: [[TMP24:%.*]] = fmul <1 x double> [[BLOCK22]], [[SPLAT_SPLAT24]]
61 ; CHECK-NEXT: [[TMP25:%.*]] = fadd <1 x double> [[TMP22]], [[TMP24]]
62 ; CHECK-NEXT: [[TMP26:%.*]] = shufflevector <1 x double> [[TMP25]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
63 ; CHECK-NEXT: [[TMP27:%.*]] = shufflevector <2 x double> [[TMP20]], <2 x double> [[TMP26]], <2 x i32> <i32 0, i32 2>
64 ; CHECK-NEXT: [[TMP28:%.*]] = shufflevector <2 x double> [[TMP13]], <2 x double> [[TMP27]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
65 ; CHECK-NEXT: ret <4 x double> [[TMP28]]
68 %bt = call <4 x double> @llvm.matrix.transpose.v4f64(<4 x double> %b, i32 2, i32 2)
69 %c = call <4 x double> @llvm.matrix.multiply.v4f64.v4f64.v4f64(<4 x double> %a, <4 x double> %bt, i32 2, i32 2, i32 2)
73 ; Lower transpose if not all uses are folded.
74 define <4 x double> @multiply_right_transpose_2x3x2(<6 x double> %a, <6 x double> %b, <6 x double>* %p) {
75 ; CHECK-LABEL: @multiply_right_transpose_2x3x2(
77 ; CHECK-NEXT: [[SPLIT39:%.*]] = shufflevector <6 x double> [[B:%.*]], <6 x double> poison, <2 x i32> <i32 0, i32 1>
78 ; CHECK-NEXT: [[SPLIT40:%.*]] = shufflevector <6 x double> [[B]], <6 x double> poison, <2 x i32> <i32 2, i32 3>
79 ; CHECK-NEXT: [[SPLIT41:%.*]] = shufflevector <6 x double> [[B]], <6 x double> poison, <2 x i32> <i32 4, i32 5>
80 ; CHECK-NEXT: [[TMP0:%.*]] = extractelement <2 x double> [[SPLIT39]], i64 0
81 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <3 x double> undef, double [[TMP0]], i64 0
82 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <2 x double> [[SPLIT40]], i64 0
83 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <3 x double> [[TMP1]], double [[TMP2]], i64 1
84 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x double> [[SPLIT41]], i64 0
85 ; CHECK-NEXT: [[TMP5:%.*]] = insertelement <3 x double> [[TMP3]], double [[TMP4]], i64 2
86 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x double> [[SPLIT39]], i64 1
87 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <3 x double> undef, double [[TMP6]], i64 0
88 ; CHECK-NEXT: [[TMP8:%.*]] = extractelement <2 x double> [[SPLIT40]], i64 1
89 ; CHECK-NEXT: [[TMP9:%.*]] = insertelement <3 x double> [[TMP7]], double [[TMP8]], i64 1
90 ; CHECK-NEXT: [[TMP10:%.*]] = extractelement <2 x double> [[SPLIT41]], i64 1
91 ; CHECK-NEXT: [[TMP11:%.*]] = insertelement <3 x double> [[TMP9]], double [[TMP10]], i64 2
92 ; CHECK-NEXT: [[TMP12:%.*]] = bitcast <6 x double>* [[P:%.*]] to double*
93 ; CHECK-NEXT: [[VEC_CAST:%.*]] = bitcast double* [[TMP12]] to <3 x double>*
94 ; CHECK-NEXT: store <3 x double> [[TMP5]], <3 x double>* [[VEC_CAST]], align 16
95 ; CHECK-NEXT: [[VEC_GEP:%.*]] = getelementptr double, double* [[TMP12]], i64 3
96 ; CHECK-NEXT: [[VEC_CAST42:%.*]] = bitcast double* [[VEC_GEP]] to <3 x double>*
97 ; CHECK-NEXT: store <3 x double> [[TMP11]], <3 x double>* [[VEC_CAST42]], align 8
98 ; CHECK-NEXT: [[SPLIT:%.*]] = shufflevector <6 x double> [[A:%.*]], <6 x double> poison, <2 x i32> <i32 0, i32 1>
99 ; CHECK-NEXT: [[SPLIT1:%.*]] = shufflevector <6 x double> [[A]], <6 x double> poison, <2 x i32> <i32 2, i32 3>
100 ; CHECK-NEXT: [[SPLIT2:%.*]] = shufflevector <6 x double> [[A]], <6 x double> poison, <2 x i32> <i32 4, i32 5>
101 ; CHECK-NEXT: [[SPLIT3:%.*]] = shufflevector <6 x double> [[B]], <6 x double> poison, <2 x i32> <i32 0, i32 1>
102 ; CHECK-NEXT: [[SPLIT4:%.*]] = shufflevector <6 x double> [[B]], <6 x double> poison, <2 x i32> <i32 2, i32 3>
103 ; CHECK-NEXT: [[SPLIT5:%.*]] = shufflevector <6 x double> [[B]], <6 x double> poison, <2 x i32> <i32 4, i32 5>
104 ; CHECK-NEXT: [[BLOCK:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> zeroinitializer
105 ; CHECK-NEXT: [[TMP13:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 0
106 ; CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <1 x double> poison, double [[TMP13]], i32 0
107 ; CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT]], <1 x double> poison, <1 x i32> zeroinitializer
108 ; CHECK-NEXT: [[TMP14:%.*]] = fmul <1 x double> [[BLOCK]], [[SPLAT_SPLAT]]
109 ; CHECK-NEXT: [[BLOCK6:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> zeroinitializer
110 ; CHECK-NEXT: [[TMP15:%.*]] = extractelement <2 x double> [[SPLIT4]], i64 0
111 ; CHECK-NEXT: [[SPLAT_SPLATINSERT7:%.*]] = insertelement <1 x double> poison, double [[TMP15]], i32 0
112 ; CHECK-NEXT: [[SPLAT_SPLAT8:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT7]], <1 x double> poison, <1 x i32> zeroinitializer
113 ; CHECK-NEXT: [[TMP16:%.*]] = fmul <1 x double> [[BLOCK6]], [[SPLAT_SPLAT8]]
114 ; CHECK-NEXT: [[TMP17:%.*]] = fadd <1 x double> [[TMP14]], [[TMP16]]
115 ; CHECK-NEXT: [[BLOCK9:%.*]] = shufflevector <2 x double> [[SPLIT2]], <2 x double> poison, <1 x i32> zeroinitializer
116 ; CHECK-NEXT: [[TMP18:%.*]] = extractelement <2 x double> [[SPLIT5]], i64 0
117 ; CHECK-NEXT: [[SPLAT_SPLATINSERT10:%.*]] = insertelement <1 x double> poison, double [[TMP18]], i32 0
118 ; CHECK-NEXT: [[SPLAT_SPLAT11:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT10]], <1 x double> poison, <1 x i32> zeroinitializer
119 ; CHECK-NEXT: [[TMP19:%.*]] = fmul <1 x double> [[BLOCK9]], [[SPLAT_SPLAT11]]
120 ; CHECK-NEXT: [[TMP20:%.*]] = fadd <1 x double> [[TMP17]], [[TMP19]]
121 ; CHECK-NEXT: [[TMP21:%.*]] = shufflevector <1 x double> [[TMP20]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
122 ; CHECK-NEXT: [[TMP22:%.*]] = shufflevector <2 x double> undef, <2 x double> [[TMP21]], <2 x i32> <i32 2, i32 1>
123 ; CHECK-NEXT: [[BLOCK12:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> <i32 1>
124 ; CHECK-NEXT: [[TMP23:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 0
125 ; CHECK-NEXT: [[SPLAT_SPLATINSERT13:%.*]] = insertelement <1 x double> poison, double [[TMP23]], i32 0
126 ; CHECK-NEXT: [[SPLAT_SPLAT14:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT13]], <1 x double> poison, <1 x i32> zeroinitializer
127 ; CHECK-NEXT: [[TMP24:%.*]] = fmul <1 x double> [[BLOCK12]], [[SPLAT_SPLAT14]]
128 ; CHECK-NEXT: [[BLOCK15:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> <i32 1>
129 ; CHECK-NEXT: [[TMP25:%.*]] = extractelement <2 x double> [[SPLIT4]], i64 0
130 ; CHECK-NEXT: [[SPLAT_SPLATINSERT16:%.*]] = insertelement <1 x double> poison, double [[TMP25]], i32 0
131 ; CHECK-NEXT: [[SPLAT_SPLAT17:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT16]], <1 x double> poison, <1 x i32> zeroinitializer
132 ; CHECK-NEXT: [[TMP26:%.*]] = fmul <1 x double> [[BLOCK15]], [[SPLAT_SPLAT17]]
133 ; CHECK-NEXT: [[TMP27:%.*]] = fadd <1 x double> [[TMP24]], [[TMP26]]
134 ; CHECK-NEXT: [[BLOCK18:%.*]] = shufflevector <2 x double> [[SPLIT2]], <2 x double> poison, <1 x i32> <i32 1>
135 ; CHECK-NEXT: [[TMP28:%.*]] = extractelement <2 x double> [[SPLIT5]], i64 0
136 ; CHECK-NEXT: [[SPLAT_SPLATINSERT19:%.*]] = insertelement <1 x double> poison, double [[TMP28]], i32 0
137 ; CHECK-NEXT: [[SPLAT_SPLAT20:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT19]], <1 x double> poison, <1 x i32> zeroinitializer
138 ; CHECK-NEXT: [[TMP29:%.*]] = fmul <1 x double> [[BLOCK18]], [[SPLAT_SPLAT20]]
139 ; CHECK-NEXT: [[TMP30:%.*]] = fadd <1 x double> [[TMP27]], [[TMP29]]
140 ; CHECK-NEXT: [[TMP31:%.*]] = shufflevector <1 x double> [[TMP30]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
141 ; CHECK-NEXT: [[TMP32:%.*]] = shufflevector <2 x double> [[TMP22]], <2 x double> [[TMP31]], <2 x i32> <i32 0, i32 2>
142 ; CHECK-NEXT: [[BLOCK21:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> zeroinitializer
143 ; CHECK-NEXT: [[TMP33:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 1
144 ; CHECK-NEXT: [[SPLAT_SPLATINSERT22:%.*]] = insertelement <1 x double> poison, double [[TMP33]], i32 0
145 ; CHECK-NEXT: [[SPLAT_SPLAT23:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT22]], <1 x double> poison, <1 x i32> zeroinitializer
146 ; CHECK-NEXT: [[TMP34:%.*]] = fmul <1 x double> [[BLOCK21]], [[SPLAT_SPLAT23]]
147 ; CHECK-NEXT: [[BLOCK24:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> zeroinitializer
148 ; CHECK-NEXT: [[TMP35:%.*]] = extractelement <2 x double> [[SPLIT4]], i64 1
149 ; CHECK-NEXT: [[SPLAT_SPLATINSERT25:%.*]] = insertelement <1 x double> poison, double [[TMP35]], i32 0
150 ; CHECK-NEXT: [[SPLAT_SPLAT26:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT25]], <1 x double> poison, <1 x i32> zeroinitializer
151 ; CHECK-NEXT: [[TMP36:%.*]] = fmul <1 x double> [[BLOCK24]], [[SPLAT_SPLAT26]]
152 ; CHECK-NEXT: [[TMP37:%.*]] = fadd <1 x double> [[TMP34]], [[TMP36]]
153 ; CHECK-NEXT: [[BLOCK27:%.*]] = shufflevector <2 x double> [[SPLIT2]], <2 x double> poison, <1 x i32> zeroinitializer
154 ; CHECK-NEXT: [[TMP38:%.*]] = extractelement <2 x double> [[SPLIT5]], i64 1
155 ; CHECK-NEXT: [[SPLAT_SPLATINSERT28:%.*]] = insertelement <1 x double> poison, double [[TMP38]], i32 0
156 ; CHECK-NEXT: [[SPLAT_SPLAT29:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT28]], <1 x double> poison, <1 x i32> zeroinitializer
157 ; CHECK-NEXT: [[TMP39:%.*]] = fmul <1 x double> [[BLOCK27]], [[SPLAT_SPLAT29]]
158 ; CHECK-NEXT: [[TMP40:%.*]] = fadd <1 x double> [[TMP37]], [[TMP39]]
159 ; CHECK-NEXT: [[TMP41:%.*]] = shufflevector <1 x double> [[TMP40]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
160 ; CHECK-NEXT: [[TMP42:%.*]] = shufflevector <2 x double> undef, <2 x double> [[TMP41]], <2 x i32> <i32 2, i32 1>
161 ; CHECK-NEXT: [[BLOCK30:%.*]] = shufflevector <2 x double> [[SPLIT]], <2 x double> poison, <1 x i32> <i32 1>
162 ; CHECK-NEXT: [[TMP43:%.*]] = extractelement <2 x double> [[SPLIT3]], i64 1
163 ; CHECK-NEXT: [[SPLAT_SPLATINSERT31:%.*]] = insertelement <1 x double> poison, double [[TMP43]], i32 0
164 ; CHECK-NEXT: [[SPLAT_SPLAT32:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT31]], <1 x double> poison, <1 x i32> zeroinitializer
165 ; CHECK-NEXT: [[TMP44:%.*]] = fmul <1 x double> [[BLOCK30]], [[SPLAT_SPLAT32]]
166 ; CHECK-NEXT: [[BLOCK33:%.*]] = shufflevector <2 x double> [[SPLIT1]], <2 x double> poison, <1 x i32> <i32 1>
167 ; CHECK-NEXT: [[TMP45:%.*]] = extractelement <2 x double> [[SPLIT4]], i64 1
168 ; CHECK-NEXT: [[SPLAT_SPLATINSERT34:%.*]] = insertelement <1 x double> poison, double [[TMP45]], i32 0
169 ; CHECK-NEXT: [[SPLAT_SPLAT35:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT34]], <1 x double> poison, <1 x i32> zeroinitializer
170 ; CHECK-NEXT: [[TMP46:%.*]] = fmul <1 x double> [[BLOCK33]], [[SPLAT_SPLAT35]]
171 ; CHECK-NEXT: [[TMP47:%.*]] = fadd <1 x double> [[TMP44]], [[TMP46]]
172 ; CHECK-NEXT: [[BLOCK36:%.*]] = shufflevector <2 x double> [[SPLIT2]], <2 x double> poison, <1 x i32> <i32 1>
173 ; CHECK-NEXT: [[TMP48:%.*]] = extractelement <2 x double> [[SPLIT5]], i64 1
174 ; CHECK-NEXT: [[SPLAT_SPLATINSERT37:%.*]] = insertelement <1 x double> poison, double [[TMP48]], i32 0
175 ; CHECK-NEXT: [[SPLAT_SPLAT38:%.*]] = shufflevector <1 x double> [[SPLAT_SPLATINSERT37]], <1 x double> poison, <1 x i32> zeroinitializer
176 ; CHECK-NEXT: [[TMP49:%.*]] = fmul <1 x double> [[BLOCK36]], [[SPLAT_SPLAT38]]
177 ; CHECK-NEXT: [[TMP50:%.*]] = fadd <1 x double> [[TMP47]], [[TMP49]]
178 ; CHECK-NEXT: [[TMP51:%.*]] = shufflevector <1 x double> [[TMP50]], <1 x double> poison, <2 x i32> <i32 0, i32 undef>
179 ; CHECK-NEXT: [[TMP52:%.*]] = shufflevector <2 x double> [[TMP42]], <2 x double> [[TMP51]], <2 x i32> <i32 0, i32 2>
180 ; CHECK-NEXT: [[TMP53:%.*]] = shufflevector <2 x double> [[TMP32]], <2 x double> [[TMP52]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
181 ; CHECK-NEXT: ret <4 x double> [[TMP53]]
184 %bt = call <6 x double> @llvm.matrix.transpose.v6f64(<6 x double> %b, i32 2, i32 3)
185 store <6 x double> %bt, <6 x double>* %p, align 16
186 %c = call <4 x double> @llvm.matrix.multiply.v4f64.v6f64.v6f64(<6 x double> %a, <6 x double> %bt, i32 2, i32 3, i32 2)
191 declare <4 x double> @llvm.matrix.multiply.v4f64.v4f64.v4f64(<4 x double>, <4 x double>, i32, i32, i32)
192 declare <4 x double> @llvm.matrix.multiply.v4f64.v6f64.v6f64(<6 x double>, <6 x double>, i32, i32, i32)
193 declare <4 x double> @llvm.matrix.transpose.v4f64(<4 x double>, i32, i32)
194 declare <6 x double> @llvm.matrix.transpose.v6f64(<6 x double>, i32, i32)