; SSE-NEXT: movd %eax, %xmm0
; SSE-NEXT: retq
;
-; AVX-LABEL: load8_ins_elt0_v16i8:
-; AVX: # %bb.0:
-; AVX-NEXT: movzbl (%rdi), %eax
-; AVX-NEXT: vmovd %eax, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: load8_ins_elt0_v16i8:
+; AVX1: # %bb.0:
+; AVX1-NEXT: movzbl (%rdi), %eax
+; AVX1-NEXT: vmovd %eax, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: load8_ins_elt0_v16i8:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastb (%rdi), %xmm0
+; AVX2-NEXT: retq
%x = load i8, i8* %p
%ins = insertelement <16 x i8> undef, i8 %x, i32 0
ret <16 x i8> %ins
; SSE-NEXT: movd %eax, %xmm0
; SSE-NEXT: retq
;
-; AVX-LABEL: load16_ins_elt0_v8i16:
-; AVX: # %bb.0:
-; AVX-NEXT: movzwl (%rdi), %eax
-; AVX-NEXT: vmovd %eax, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: load16_ins_elt0_v8i16:
+; AVX1: # %bb.0:
+; AVX1-NEXT: movzwl (%rdi), %eax
+; AVX1-NEXT: vmovd %eax, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: load16_ins_elt0_v8i16:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastw (%rdi), %xmm0
+; AVX2-NEXT: retq
%x = load i16, i16* %p
%ins = insertelement <8 x i16> undef, i16 %x, i32 0
ret <8 x i16> %ins
; SSE-NEXT: pslld $24, %xmm0
; SSE-NEXT: retq
;
-; AVX-LABEL: load8_ins_eltc_v16i8:
-; AVX: # %bb.0:
-; AVX-NEXT: movzbl (%rdi), %eax
-; AVX-NEXT: vmovd %eax, %xmm0
-; AVX-NEXT: vpslld $24, %xmm0, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: load8_ins_eltc_v16i8:
+; AVX1: # %bb.0:
+; AVX1-NEXT: movzbl (%rdi), %eax
+; AVX1-NEXT: vmovd %eax, %xmm0
+; AVX1-NEXT: vpslld $24, %xmm0, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: load8_ins_eltc_v16i8:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastb (%rdi), %xmm0
+; AVX2-NEXT: retq
%x = load i8, i8* %p
%ins = insertelement <16 x i8> undef, i8 %x, i32 3
ret <16 x i8> %ins
; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,1,0,1]
; SSE-NEXT: retq
;
-; AVX1-LABEL: load32_ins_eltc_v4i32:
-; AVX1: # %bb.0:
-; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
-; AVX1-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,0,1]
-; AVX1-NEXT: retq
-;
-; AVX2-LABEL: load32_ins_eltc_v4i32:
-; AVX2: # %bb.0:
-; AVX2-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
-; AVX2-NEXT: vpbroadcastq %xmm0, %xmm0
-; AVX2-NEXT: retq
+; AVX-LABEL: load32_ins_eltc_v4i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vbroadcastss (%rdi), %xmm0
+; AVX-NEXT: retq
%x = load i32, i32* %p
%ins = insertelement <4 x i32> undef, i32 %x, i32 2
ret <4 x i32> %ins
; SSE-NEXT: movd %eax, %xmm0
; SSE-NEXT: retq
;
-; AVX-LABEL: load8_ins_elt0_v32i8:
-; AVX: # %bb.0:
-; AVX-NEXT: movzbl (%rdi), %eax
-; AVX-NEXT: vmovd %eax, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: load8_ins_elt0_v32i8:
+; AVX1: # %bb.0:
+; AVX1-NEXT: movzbl (%rdi), %eax
+; AVX1-NEXT: vmovd %eax, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: load8_ins_elt0_v32i8:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastb (%rdi), %ymm0
+; AVX2-NEXT: retq
%x = load i8, i8* %p
%ins = insertelement <32 x i8> undef, i8 %x, i32 0
ret <32 x i8> %ins
; SSE-NEXT: movd %eax, %xmm0
; SSE-NEXT: retq
;
-; AVX-LABEL: load16_ins_elt0_v16i16:
-; AVX: # %bb.0:
-; AVX-NEXT: movzwl (%rdi), %eax
-; AVX-NEXT: vmovd %eax, %xmm0
-; AVX-NEXT: retq
+; AVX1-LABEL: load16_ins_elt0_v16i16:
+; AVX1: # %bb.0:
+; AVX1-NEXT: movzwl (%rdi), %eax
+; AVX1-NEXT: vmovd %eax, %xmm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: load16_ins_elt0_v16i16:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpbroadcastw (%rdi), %ymm0
+; AVX2-NEXT: retq
%x = load i16, i16* %p
%ins = insertelement <16 x i16> undef, i16 %x, i32 0
ret <16 x i16> %ins
;
; AVX2-LABEL: load8_ins_eltc_v32i8:
; AVX2: # %bb.0:
-; AVX2-NEXT: movzbl (%rdi), %eax
-; AVX2-NEXT: vmovd %eax, %xmm0
-; AVX2-NEXT: vpsllq $40, %xmm0, %xmm0
-; AVX2-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
+; AVX2-NEXT: vpbroadcastb (%rdi), %ymm0
; AVX2-NEXT: retq
%x = load i8, i8* %p
%ins = insertelement <32 x i8> undef, i8 %x, i32 21
;
; AVX2-LABEL: load16_ins_eltc_v16i16:
; AVX2: # %bb.0:
-; AVX2-NEXT: movzwl (%rdi), %eax
-; AVX2-NEXT: vmovd %eax, %xmm0
-; AVX2-NEXT: vpbroadcastw %xmm0, %xmm0
-; AVX2-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0
+; AVX2-NEXT: vpbroadcastw (%rdi), %ymm0
; AVX2-NEXT: retq
%x = load i16, i16* %p
%ins = insertelement <16 x i16> undef, i16 %x, i32 11
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm0[0,1,2,0]
; SSE-NEXT: retq
;
-; AVX1-LABEL: load32_ins_eltc_v8i32:
-; AVX1: # %bb.0:
-; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
-; AVX1-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,2,0]
-; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX1-NEXT: retq
-;
-; AVX2-LABEL: load32_ins_eltc_v8i32:
-; AVX2: # %bb.0:
-; AVX2-NEXT: vbroadcastss (%rdi), %xmm0
-; AVX2-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX2-NEXT: retq
+; AVX-LABEL: load32_ins_eltc_v8i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vbroadcastss (%rdi), %ymm0
+; AVX-NEXT: retq
%x = load i32, i32* %p
%ins = insertelement <8 x i32> undef, i32 %x, i32 7
ret <8 x i32> %ins
; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm0[0,1,0,1]
; SSE-NEXT: retq
;
-; AVX1-LABEL: load64_ins_eltc_v4i64:
-; AVX1: # %bb.0:
-; AVX1-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
-; AVX1-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[0,1,0,1]
-; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX1-NEXT: retq
-;
-; AVX2-LABEL: load64_ins_eltc_v4i64:
-; AVX2: # %bb.0:
-; AVX2-NEXT: vbroadcastsd (%rdi), %ymm0
-; AVX2-NEXT: retq
+; AVX-LABEL: load64_ins_eltc_v4i64:
+; AVX: # %bb.0:
+; AVX-NEXT: vbroadcastsd (%rdi), %ymm0
+; AVX-NEXT: retq
%x = load i64, i64* %p
%ins = insertelement <4 x i64> undef, i64 %x, i32 3
ret <4 x i64> %ins
; SSE-NEXT: movsldup {{.*#+}} xmm1 = xmm0[0,0,2,2]
; SSE-NEXT: retq
;
-; AVX1-LABEL: load32_ins_eltc_v8f32:
-; AVX1: # %bb.0:
-; AVX1-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
-; AVX1-NEXT: vmovsldup {{.*#+}} xmm0 = xmm0[0,0,2,2]
-; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX1-NEXT: retq
-;
-; AVX2-LABEL: load32_ins_eltc_v8f32:
-; AVX2: # %bb.0:
-; AVX2-NEXT: vbroadcastss (%rdi), %xmm0
-; AVX2-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX2-NEXT: retq
+; AVX-LABEL: load32_ins_eltc_v8f32:
+; AVX: # %bb.0:
+; AVX-NEXT: vbroadcastss (%rdi), %ymm0
+; AVX-NEXT: retq
%x = load float, float* %p
%ins = insertelement <8 x float> undef, float %x, i32 5
ret <8 x float> %ins
; SSE-NEXT: movddup {{.*#+}} xmm1 = mem[0,0]
; SSE-NEXT: retq
;
-; AVX1-LABEL: load64_ins_eltc_v4f64:
-; AVX1: # %bb.0:
-; AVX1-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0]
-; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
-; AVX1-NEXT: retq
-;
-; AVX2-LABEL: load64_ins_eltc_v4f64:
-; AVX2: # %bb.0:
-; AVX2-NEXT: vbroadcastsd (%rdi), %ymm0
-; AVX2-NEXT: retq
+; AVX-LABEL: load64_ins_eltc_v4f64:
+; AVX: # %bb.0:
+; AVX-NEXT: vbroadcastsd (%rdi), %ymm0
+; AVX-NEXT: retq
%x = load double, double* %p
%ins = insertelement <4 x double> undef, double %x, i32 3
ret <4 x double> %ins
; X86-AVX512: ## %bb.0: ## %entry
; X86-AVX512-NEXT: movl L_g16$non_lazy_ptr, %eax ## encoding: [0xa1,A,A,A,A]
; X86-AVX512-NEXT: ## fixup A - offset: 1, value: L_g16$non_lazy_ptr, kind: FK_Data_4
-; X86-AVX512-NEXT: vpmovzxbq (%eax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x32,0x00]
-; X86-AVX512-NEXT: ## xmm0 = mem[0],zero,zero,zero,zero,zero,zero,zero,mem[1],zero,zero,zero,zero,zero,zero,zero
+; X86-AVX512-NEXT: vpbroadcastw (%eax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x79,0x00]
+; X86-AVX512-NEXT: vpmovzxbq %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x32,0xc0]
+; X86-AVX512-NEXT: ## xmm0 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero
; X86-AVX512-NEXT: retl ## encoding: [0xc3]
;
; X64-SSE-LABEL: pmovzxbq_1:
; X64-AVX512: ## %bb.0: ## %entry
; X64-AVX512-NEXT: movq _g16@{{.*}}(%rip), %rax ## encoding: [0x48,0x8b,0x05,A,A,A,A]
; X64-AVX512-NEXT: ## fixup A - offset: 3, value: _g16@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
-; X64-AVX512-NEXT: vpmovzxbq (%rax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x32,0x00]
-; X64-AVX512-NEXT: ## xmm0 = mem[0],zero,zero,zero,zero,zero,zero,zero,mem[1],zero,zero,zero,zero,zero,zero,zero
+; X64-AVX512-NEXT: vpbroadcastw (%rax), %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x79,0x00]
+; X64-AVX512-NEXT: vpmovzxbq %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x32,0xc0]
+; X64-AVX512-NEXT: ## xmm0 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero
; X64-AVX512-NEXT: retq ## encoding: [0xc3]
entry:
%0 = load i16, i16* @g16, align 2 ; <i16> [#uses=1]