@@ -162,4 +162,32 @@ entry:
162
162
ret <4 x float > %shuffle9.i
163
163
}
164
164
165
+ define <2 x float > @test_fptrunc (double %f ) {
166
+ ; CHECK: @test_fptrunc
167
+ ; CHECK: insertelement
168
+ ; CHECK: insertelement
169
+ ; CHECK-NOT: insertelement
170
+ %tmp9 = insertelement <4 x double > undef , double %f , i32 0
171
+ %tmp10 = insertelement <4 x double > %tmp9 , double 0 .000000e+00 , i32 1
172
+ %tmp11 = insertelement <4 x double > %tmp10 , double 0 .000000e+00 , i32 2
173
+ %tmp12 = insertelement <4 x double > %tmp11 , double 0 .000000e+00 , i32 3
174
+ %tmp5 = fptrunc <4 x double > %tmp12 to <4 x float >
175
+ %ret = shufflevector <4 x float > %tmp5 , <4 x float > undef , <2 x i32 > <i32 0 , i32 1 >
176
+ ret <2 x float > %ret
177
+ }
178
+
179
+ define <2 x double > @test_fpext (float %f ) {
180
+ ; CHECK: @test_fpext
181
+ ; CHECK: insertelement
182
+ ; CHECK: insertelement
183
+ ; CHECK-NOT: insertelement
184
+ %tmp9 = insertelement <4 x float > undef , float %f , i32 0
185
+ %tmp10 = insertelement <4 x float > %tmp9 , float 0 .000000e+00 , i32 1
186
+ %tmp11 = insertelement <4 x float > %tmp10 , float 0 .000000e+00 , i32 2
187
+ %tmp12 = insertelement <4 x float > %tmp11 , float 0 .000000e+00 , i32 3
188
+ %tmp5 = fpext <4 x float > %tmp12 to <4 x double >
189
+ %ret = shufflevector <4 x double > %tmp5 , <4 x double > undef , <2 x i32 > <i32 0 , i32 1 >
190
+ ret <2 x double > %ret
191
+ }
192
+
165
193
0 commit comments