parent
b7d75fee74
commit
a6878bdc0f
|
@ -55,3 +55,51 @@ entry:
|
|||
%2 = insertelement <2 x double> %1, double -0.0, i32 1
|
||||
ret <2 x double> %2
|
||||
}
|
||||
|
||||
define <4 x float> @test_buildvector_v4f32_register(float %f0, float %f1, float %f2, float %f3) {
|
||||
; CHECK-LABEL: test_buildvector_v4f32_register:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
|
||||
; CHECK-NEXT: retq
|
||||
%ins0 = insertelement <4 x float> undef, float %f0, i32 0
|
||||
%ins1 = insertelement <4 x float> %ins0, float %f1, i32 1
|
||||
%ins2 = insertelement <4 x float> %ins1, float %f2, i32 2
|
||||
%ins3 = insertelement <4 x float> %ins2, float %f3, i32 3
|
||||
ret <4 x float> %ins3
|
||||
}
|
||||
|
||||
define <4 x float> @test_buildvector_v4f32_load(float* %p0, float* %p1, float* %p2, float* %p3) {
|
||||
; CHECK-LABEL: test_buildvector_v4f32_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
|
||||
; CHECK-NEXT: retq
|
||||
%f0 = load float, float* %p0, align 4
|
||||
%f1 = load float, float* %p1, align 4
|
||||
%f2 = load float, float* %p2, align 4
|
||||
%f3 = load float, float* %p3, align 4
|
||||
%ins0 = insertelement <4 x float> undef, float %f0, i32 0
|
||||
%ins1 = insertelement <4 x float> %ins0, float %f1, i32 1
|
||||
%ins2 = insertelement <4 x float> %ins1, float %f2, i32 2
|
||||
%ins3 = insertelement <4 x float> %ins2, float %f3, i32 3
|
||||
ret <4 x float> %ins3
|
||||
}
|
||||
|
||||
define <4 x float> @test_buildvector_v4f32_partial_load(float %f0, float %f1, float %f2, float* %p3) {
|
||||
; CHECK-LABEL: test_buildvector_v4f32_partial_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
|
||||
; CHECK-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
|
||||
; CHECK-NEXT: retq
|
||||
%f3 = load float, float* %p3, align 4
|
||||
%ins0 = insertelement <4 x float> undef, float %f0, i32 0
|
||||
%ins1 = insertelement <4 x float> %ins0, float %f1, i32 1
|
||||
%ins2 = insertelement <4 x float> %ins1, float %f2, i32 2
|
||||
%ins3 = insertelement <4 x float> %ins2, float %f3, i32 3
|
||||
ret <4 x float> %ins3
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue