brintos

brintos / llvm-project-archived public Read only

0
0
Text · 17.8 KiB · 5175bed Raw
505 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -fast-isel -mtriple=i386-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,X86-SSE3; RUN: llc < %s -fast-isel -mtriple=i386-unknown-unknown -mattr=+sse4.2,-crc32 | FileCheck %s --check-prefixes=SSE,X86-SSE4; RUN: llc < %s -fast-isel -mtriple=i386-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,X86-AVX,AVX15; RUN: llc < %s -fast-isel -mtriple=i386-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl | FileCheck %s --check-prefixes=AVX,X86-AVX,AVX5126; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,X64-SSE7; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+sse4.2,-crc32 | FileCheck %s --check-prefixes=SSE,X64-SSE8; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,X64-AVX,AVX19; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl | FileCheck %s --check-prefixes=AVX,X64-AVX,AVX51210 11; NOTE: This should use IR equivalent to what is generated by clang/test/CodeGen/sse42-builtins.c12 13define i32 @test_mm_cmpestra(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) nounwind {14; X86-SSE-LABEL: test_mm_cmpestra:15; X86-SSE:       # %bb.0:16; X86-SSE-NEXT:    pushl %ebx17; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx18; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax19; X86-SSE-NEXT:    xorl %ebx, %ebx20; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm021; X86-SSE-NEXT:    seta %bl22; X86-SSE-NEXT:    movl %ebx, %eax23; X86-SSE-NEXT:    popl %ebx24; X86-SSE-NEXT:    retl25;26; X86-AVX-LABEL: test_mm_cmpestra:27; X86-AVX:       # %bb.0:28; X86-AVX-NEXT:    pushl %ebx29; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx30; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax31; X86-AVX-NEXT:    xorl %ebx, %ebx32; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm033; X86-AVX-NEXT:    seta %bl34; X86-AVX-NEXT:    movl %ebx, %eax35; X86-AVX-NEXT:    popl %ebx36; X86-AVX-NEXT:    retl37;38; X64-SSE-LABEL: test_mm_cmpestra:39; X64-SSE:       # %bb.0:40; X64-SSE-NEXT:    movl %esi, %edx41; X64-SSE-NEXT:    movl %edi, %eax42; X64-SSE-NEXT:    xorl %esi, %esi43; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm044; X64-SSE-NEXT:    seta %sil45; X64-SSE-NEXT:    movl %esi, %eax46; X64-SSE-NEXT:    retq47;48; X64-AVX-LABEL: test_mm_cmpestra:49; X64-AVX:       # %bb.0:50; X64-AVX-NEXT:    movl %esi, %edx51; X64-AVX-NEXT:    movl %edi, %eax52; X64-AVX-NEXT:    xorl %esi, %esi53; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm054; X64-AVX-NEXT:    seta %sil55; X64-AVX-NEXT:    movl %esi, %eax56; X64-AVX-NEXT:    retq57  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>58  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>59  %res = call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)60  ret i32 %res61}62declare i32 @llvm.x86.sse42.pcmpestria128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone63 64define i32 @test_mm_cmpestrc(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) nounwind {65; X86-SSE-LABEL: test_mm_cmpestrc:66; X86-SSE:       # %bb.0:67; X86-SSE-NEXT:    pushl %ebx68; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx69; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax70; X86-SSE-NEXT:    xorl %ebx, %ebx71; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm072; X86-SSE-NEXT:    setb %bl73; X86-SSE-NEXT:    movl %ebx, %eax74; X86-SSE-NEXT:    popl %ebx75; X86-SSE-NEXT:    retl76;77; X86-AVX-LABEL: test_mm_cmpestrc:78; X86-AVX:       # %bb.0:79; X86-AVX-NEXT:    pushl %ebx80; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx81; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax82; X86-AVX-NEXT:    xorl %ebx, %ebx83; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm084; X86-AVX-NEXT:    setb %bl85; X86-AVX-NEXT:    movl %ebx, %eax86; X86-AVX-NEXT:    popl %ebx87; X86-AVX-NEXT:    retl88;89; X64-SSE-LABEL: test_mm_cmpestrc:90; X64-SSE:       # %bb.0:91; X64-SSE-NEXT:    movl %esi, %edx92; X64-SSE-NEXT:    movl %edi, %eax93; X64-SSE-NEXT:    xorl %esi, %esi94; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm095; X64-SSE-NEXT:    setb %sil96; X64-SSE-NEXT:    movl %esi, %eax97; X64-SSE-NEXT:    retq98;99; X64-AVX-LABEL: test_mm_cmpestrc:100; X64-AVX:       # %bb.0:101; X64-AVX-NEXT:    movl %esi, %edx102; X64-AVX-NEXT:    movl %edi, %eax103; X64-AVX-NEXT:    xorl %esi, %esi104; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0105; X64-AVX-NEXT:    setb %sil106; X64-AVX-NEXT:    movl %esi, %eax107; X64-AVX-NEXT:    retq108  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>109  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>110  %res = call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)111  ret i32 %res112}113declare i32 @llvm.x86.sse42.pcmpestric128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone114 115define i32 @test_mm_cmpestri(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) {116; X86-SSE-LABEL: test_mm_cmpestri:117; X86-SSE:       # %bb.0:118; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx119; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax120; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0121; X86-SSE-NEXT:    movl %ecx, %eax122; X86-SSE-NEXT:    retl123;124; X86-AVX-LABEL: test_mm_cmpestri:125; X86-AVX:       # %bb.0:126; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx127; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax128; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0129; X86-AVX-NEXT:    movl %ecx, %eax130; X86-AVX-NEXT:    retl131;132; X64-SSE-LABEL: test_mm_cmpestri:133; X64-SSE:       # %bb.0:134; X64-SSE-NEXT:    movl %esi, %edx135; X64-SSE-NEXT:    movl %edi, %eax136; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0137; X64-SSE-NEXT:    movl %ecx, %eax138; X64-SSE-NEXT:    retq139;140; X64-AVX-LABEL: test_mm_cmpestri:141; X64-AVX:       # %bb.0:142; X64-AVX-NEXT:    movl %esi, %edx143; X64-AVX-NEXT:    movl %edi, %eax144; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0145; X64-AVX-NEXT:    movl %ecx, %eax146; X64-AVX-NEXT:    retq147  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>148  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>149  %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)150  ret i32 %res151}152declare i32 @llvm.x86.sse42.pcmpestri128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone153 154define <2 x i64> @test_mm_cmpestrm(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) {155; X86-SSE-LABEL: test_mm_cmpestrm:156; X86-SSE:       # %bb.0:157; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx158; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax159; X86-SSE-NEXT:    pcmpestrm $7, %xmm1, %xmm0160; X86-SSE-NEXT:    retl161;162; X86-AVX-LABEL: test_mm_cmpestrm:163; X86-AVX:       # %bb.0:164; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx165; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax166; X86-AVX-NEXT:    vpcmpestrm $7, %xmm1, %xmm0167; X86-AVX-NEXT:    retl168;169; X64-SSE-LABEL: test_mm_cmpestrm:170; X64-SSE:       # %bb.0:171; X64-SSE-NEXT:    movl %esi, %edx172; X64-SSE-NEXT:    movl %edi, %eax173; X64-SSE-NEXT:    pcmpestrm $7, %xmm1, %xmm0174; X64-SSE-NEXT:    retq175;176; X64-AVX-LABEL: test_mm_cmpestrm:177; X64-AVX:       # %bb.0:178; X64-AVX-NEXT:    movl %esi, %edx179; X64-AVX-NEXT:    movl %edi, %eax180; X64-AVX-NEXT:    vpcmpestrm $7, %xmm1, %xmm0181; X64-AVX-NEXT:    retq182  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>183  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>184  %res = call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)185  %bc = bitcast <16 x i8> %res to <2 x i64>186  ret <2 x i64> %bc187}188declare <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone189 190define i32 @test_mm_cmpestro(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) nounwind {191; X86-SSE-LABEL: test_mm_cmpestro:192; X86-SSE:       # %bb.0:193; X86-SSE-NEXT:    pushl %ebx194; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx195; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax196; X86-SSE-NEXT:    xorl %ebx, %ebx197; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0198; X86-SSE-NEXT:    seto %bl199; X86-SSE-NEXT:    movl %ebx, %eax200; X86-SSE-NEXT:    popl %ebx201; X86-SSE-NEXT:    retl202;203; X86-AVX-LABEL: test_mm_cmpestro:204; X86-AVX:       # %bb.0:205; X86-AVX-NEXT:    pushl %ebx206; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx207; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax208; X86-AVX-NEXT:    xorl %ebx, %ebx209; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0210; X86-AVX-NEXT:    seto %bl211; X86-AVX-NEXT:    movl %ebx, %eax212; X86-AVX-NEXT:    popl %ebx213; X86-AVX-NEXT:    retl214;215; X64-SSE-LABEL: test_mm_cmpestro:216; X64-SSE:       # %bb.0:217; X64-SSE-NEXT:    movl %esi, %edx218; X64-SSE-NEXT:    movl %edi, %eax219; X64-SSE-NEXT:    xorl %esi, %esi220; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0221; X64-SSE-NEXT:    seto %sil222; X64-SSE-NEXT:    movl %esi, %eax223; X64-SSE-NEXT:    retq224;225; X64-AVX-LABEL: test_mm_cmpestro:226; X64-AVX:       # %bb.0:227; X64-AVX-NEXT:    movl %esi, %edx228; X64-AVX-NEXT:    movl %edi, %eax229; X64-AVX-NEXT:    xorl %esi, %esi230; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0231; X64-AVX-NEXT:    seto %sil232; X64-AVX-NEXT:    movl %esi, %eax233; X64-AVX-NEXT:    retq234  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>235  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>236  %res = call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)237  ret i32 %res238}239declare i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone240 241define i32 @test_mm_cmpestrs(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) nounwind {242; X86-SSE-LABEL: test_mm_cmpestrs:243; X86-SSE:       # %bb.0:244; X86-SSE-NEXT:    pushl %ebx245; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx246; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax247; X86-SSE-NEXT:    xorl %ebx, %ebx248; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0249; X86-SSE-NEXT:    sets %bl250; X86-SSE-NEXT:    movl %ebx, %eax251; X86-SSE-NEXT:    popl %ebx252; X86-SSE-NEXT:    retl253;254; X86-AVX-LABEL: test_mm_cmpestrs:255; X86-AVX:       # %bb.0:256; X86-AVX-NEXT:    pushl %ebx257; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx258; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax259; X86-AVX-NEXT:    xorl %ebx, %ebx260; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0261; X86-AVX-NEXT:    sets %bl262; X86-AVX-NEXT:    movl %ebx, %eax263; X86-AVX-NEXT:    popl %ebx264; X86-AVX-NEXT:    retl265;266; X64-SSE-LABEL: test_mm_cmpestrs:267; X64-SSE:       # %bb.0:268; X64-SSE-NEXT:    movl %esi, %edx269; X64-SSE-NEXT:    movl %edi, %eax270; X64-SSE-NEXT:    xorl %esi, %esi271; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0272; X64-SSE-NEXT:    sets %sil273; X64-SSE-NEXT:    movl %esi, %eax274; X64-SSE-NEXT:    retq275;276; X64-AVX-LABEL: test_mm_cmpestrs:277; X64-AVX:       # %bb.0:278; X64-AVX-NEXT:    movl %esi, %edx279; X64-AVX-NEXT:    movl %edi, %eax280; X64-AVX-NEXT:    xorl %esi, %esi281; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0282; X64-AVX-NEXT:    sets %sil283; X64-AVX-NEXT:    movl %esi, %eax284; X64-AVX-NEXT:    retq285  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>286  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>287  %res = call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)288  ret i32 %res289}290declare i32 @llvm.x86.sse42.pcmpestris128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone291 292define i32 @test_mm_cmpestrz(<2 x i64> %a0, i32 %a1, <2 x i64> %a2, i32 %a3) nounwind {293; X86-SSE-LABEL: test_mm_cmpestrz:294; X86-SSE:       # %bb.0:295; X86-SSE-NEXT:    pushl %ebx296; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %edx297; X86-SSE-NEXT:    movl {{[0-9]+}}(%esp), %eax298; X86-SSE-NEXT:    xorl %ebx, %ebx299; X86-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0300; X86-SSE-NEXT:    sete %bl301; X86-SSE-NEXT:    movl %ebx, %eax302; X86-SSE-NEXT:    popl %ebx303; X86-SSE-NEXT:    retl304;305; X86-AVX-LABEL: test_mm_cmpestrz:306; X86-AVX:       # %bb.0:307; X86-AVX-NEXT:    pushl %ebx308; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %edx309; X86-AVX-NEXT:    movl {{[0-9]+}}(%esp), %eax310; X86-AVX-NEXT:    xorl %ebx, %ebx311; X86-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0312; X86-AVX-NEXT:    sete %bl313; X86-AVX-NEXT:    movl %ebx, %eax314; X86-AVX-NEXT:    popl %ebx315; X86-AVX-NEXT:    retl316;317; X64-SSE-LABEL: test_mm_cmpestrz:318; X64-SSE:       # %bb.0:319; X64-SSE-NEXT:    movl %esi, %edx320; X64-SSE-NEXT:    movl %edi, %eax321; X64-SSE-NEXT:    xorl %esi, %esi322; X64-SSE-NEXT:    pcmpestri $7, %xmm1, %xmm0323; X64-SSE-NEXT:    sete %sil324; X64-SSE-NEXT:    movl %esi, %eax325; X64-SSE-NEXT:    retq326;327; X64-AVX-LABEL: test_mm_cmpestrz:328; X64-AVX:       # %bb.0:329; X64-AVX-NEXT:    movl %esi, %edx330; X64-AVX-NEXT:    movl %edi, %eax331; X64-AVX-NEXT:    xorl %esi, %esi332; X64-AVX-NEXT:    vpcmpestri $7, %xmm1, %xmm0333; X64-AVX-NEXT:    sete %sil334; X64-AVX-NEXT:    movl %esi, %eax335; X64-AVX-NEXT:    retq336  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>337  %arg2 = bitcast <2 x i64> %a2 to <16 x i8>338  %res = call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %arg0, i32 %a1, <16 x i8> %arg2, i32 %a3, i8 7)339  ret i32 %res340}341declare i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8>, i32, <16 x i8>, i32, i8) nounwind readnone342 343define <2 x i64> @test_mm_cmpgt_epi64(<2 x i64> %a0, <2 x i64> %a1) {344; SSE-LABEL: test_mm_cmpgt_epi64:345; SSE:       # %bb.0:346; SSE-NEXT:    pcmpgtq %xmm1, %xmm0347; SSE-NEXT:    ret{{[l|q]}}348;349; AVX1-LABEL: test_mm_cmpgt_epi64:350; AVX1:       # %bb.0:351; AVX1-NEXT:    vpcmpgtq %xmm1, %xmm0, %xmm0352; AVX1-NEXT:    ret{{[l|q]}}353;354; AVX512-LABEL: test_mm_cmpgt_epi64:355; AVX512:       # %bb.0:356; AVX512-NEXT:    vpcmpgtq %xmm1, %xmm0, %k0357; AVX512-NEXT:    vpmovm2q %k0, %xmm0358; AVX512-NEXT:    ret{{[l|q]}}359  %cmp = icmp sgt <2 x i64> %a0, %a1360  %res = sext <2 x i1> %cmp to <2 x i64>361  ret <2 x i64> %res362}363 364define i32 @test_mm_cmpistra(<2 x i64> %a0, <2 x i64> %a1) {365; SSE-LABEL: test_mm_cmpistra:366; SSE:       # %bb.0:367; SSE-NEXT:    xorl %eax, %eax368; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0369; SSE-NEXT:    seta %al370; SSE-NEXT:    ret{{[l|q]}}371;372; AVX-LABEL: test_mm_cmpistra:373; AVX:       # %bb.0:374; AVX-NEXT:    xorl %eax, %eax375; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0376; AVX-NEXT:    seta %al377; AVX-NEXT:    ret{{[l|q]}}378  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>379  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>380  %res = call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)381  ret i32 %res382}383declare i32 @llvm.x86.sse42.pcmpistria128(<16 x i8>, <16 x i8>, i8) nounwind readnone384 385define i32 @test_mm_cmpistrc(<2 x i64> %a0, <2 x i64> %a1) {386; SSE-LABEL: test_mm_cmpistrc:387; SSE:       # %bb.0:388; SSE-NEXT:    xorl %eax, %eax389; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0390; SSE-NEXT:    setb %al391; SSE-NEXT:    ret{{[l|q]}}392;393; AVX-LABEL: test_mm_cmpistrc:394; AVX:       # %bb.0:395; AVX-NEXT:    xorl %eax, %eax396; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0397; AVX-NEXT:    setb %al398; AVX-NEXT:    ret{{[l|q]}}399  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>400  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>401  %res = call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)402  ret i32 %res403}404declare i32 @llvm.x86.sse42.pcmpistric128(<16 x i8>, <16 x i8>, i8) nounwind readnone405 406define i32 @test_mm_cmpistri(<2 x i64> %a0, <2 x i64> %a1) {407; SSE-LABEL: test_mm_cmpistri:408; SSE:       # %bb.0:409; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0410; SSE-NEXT:    movl %ecx, %eax411; SSE-NEXT:    ret{{[l|q]}}412;413; AVX-LABEL: test_mm_cmpistri:414; AVX:       # %bb.0:415; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0416; AVX-NEXT:    movl %ecx, %eax417; AVX-NEXT:    ret{{[l|q]}}418  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>419  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>420  %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)421  ret i32 %res422}423declare i32 @llvm.x86.sse42.pcmpistri128(<16 x i8>, <16 x i8>, i8) nounwind readnone424 425define <2 x i64> @test_mm_cmpistrm(<2 x i64> %a0, <2 x i64> %a1) {426; SSE-LABEL: test_mm_cmpistrm:427; SSE:       # %bb.0:428; SSE-NEXT:    pcmpistrm $7, %xmm1, %xmm0429; SSE-NEXT:    ret{{[l|q]}}430;431; AVX-LABEL: test_mm_cmpistrm:432; AVX:       # %bb.0:433; AVX-NEXT:    vpcmpistrm $7, %xmm1, %xmm0434; AVX-NEXT:    ret{{[l|q]}}435  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>436  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>437  %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)438  %bc = bitcast <16 x i8> %res to <2 x i64>439  ret <2 x i64> %bc440}441declare <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8>, <16 x i8>, i8) nounwind readnone442 443define i32 @test_mm_cmpistro(<2 x i64> %a0, <2 x i64> %a1) {444; SSE-LABEL: test_mm_cmpistro:445; SSE:       # %bb.0:446; SSE-NEXT:    xorl %eax, %eax447; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0448; SSE-NEXT:    seto %al449; SSE-NEXT:    ret{{[l|q]}}450;451; AVX-LABEL: test_mm_cmpistro:452; AVX:       # %bb.0:453; AVX-NEXT:    xorl %eax, %eax454; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0455; AVX-NEXT:    seto %al456; AVX-NEXT:    ret{{[l|q]}}457  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>458  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>459  %res = call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)460  ret i32 %res461}462declare i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8>, <16 x i8>, i8) nounwind readnone463 464define i32 @test_mm_cmpistrs(<2 x i64> %a0, <2 x i64> %a1) {465; SSE-LABEL: test_mm_cmpistrs:466; SSE:       # %bb.0:467; SSE-NEXT:    xorl %eax, %eax468; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0469; SSE-NEXT:    sets %al470; SSE-NEXT:    ret{{[l|q]}}471;472; AVX-LABEL: test_mm_cmpistrs:473; AVX:       # %bb.0:474; AVX-NEXT:    xorl %eax, %eax475; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0476; AVX-NEXT:    sets %al477; AVX-NEXT:    ret{{[l|q]}}478  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>479  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>480  %res = call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)481  ret i32 %res482}483declare i32 @llvm.x86.sse42.pcmpistris128(<16 x i8>, <16 x i8>, i8) nounwind readnone484 485define i32 @test_mm_cmpistrz(<2 x i64> %a0, <2 x i64> %a1) {486; SSE-LABEL: test_mm_cmpistrz:487; SSE:       # %bb.0:488; SSE-NEXT:    xorl %eax, %eax489; SSE-NEXT:    pcmpistri $7, %xmm1, %xmm0490; SSE-NEXT:    sete %al491; SSE-NEXT:    ret{{[l|q]}}492;493; AVX-LABEL: test_mm_cmpistrz:494; AVX:       # %bb.0:495; AVX-NEXT:    xorl %eax, %eax496; AVX-NEXT:    vpcmpistri $7, %xmm1, %xmm0497; AVX-NEXT:    sete %al498; AVX-NEXT:    ret{{[l|q]}}499  %arg0 = bitcast <2 x i64> %a0 to <16 x i8>500  %arg1 = bitcast <2 x i64> %a1 to <16 x i8>501  %res = call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %arg0, <16 x i8> %arg1, i8 7)502  ret i32 %res503}504declare i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8>, <16 x i8>, i8) nounwind readnone505