1 ; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+sse4.1 | FileCheck %s -check-prefix=SSE41
2 ; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+avx | FileCheck %s -check-prefix=AVX
4 ; CHECK-LABEL: extract_i8
5 define void @extract_i8(i8* nocapture %dst, <16 x i8> %foo) {
10 %vecext = extractelement <16 x i8> %foo, i32 15
11 store i8 %vecext, i8* %dst, align 1
15 ; CHECK-LABEL: extract_i16
16 define void @extract_i16(i16* nocapture %dst, <8 x i16> %foo) {
21 %vecext = extractelement <8 x i16> %foo, i32 7
22 store i16 %vecext, i16* %dst, align 1
26 ; CHECK-LABEL: extract_i8_undef
27 define void @extract_i8_undef(i8* nocapture %dst, <16 x i8> %foo) {
32 %vecext = extractelement <16 x i8> %foo, i32 16 ; undef
33 store i8 %vecext, i8* %dst, align 1
37 ; CHECK-LABEL: extract_i16_undef
38 define void @extract_i16_undef(i16* nocapture %dst, <8 x i16> %foo) {
43 %vecext = extractelement <8 x i16> %foo, i32 9 ; undef
44 store i16 %vecext, i16* %dst, align 1