38 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-- -mattr=+sse2 | FileCheck %s -check-prefix=X863; RUN: llc < %s -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s -check-prefix=X644 5define <2 x i64> @_mm_insert_epi16(<2 x i64> %a, i32 %b, i32 %imm) nounwind readnone {6; X86-LABEL: _mm_insert_epi16:7; X86: # %bb.0: # %entry8; X86-NEXT: pushl %ebp9; X86-NEXT: movl %esp, %ebp10; X86-NEXT: andl $-16, %esp11; X86-NEXT: subl $32, %esp12; X86-NEXT: movl 12(%ebp), %eax13; X86-NEXT: movzwl 8(%ebp), %ecx14; X86-NEXT: andl $7, %eax15; X86-NEXT: movaps %xmm0, (%esp)16; X86-NEXT: movw %cx, (%esp,%eax,2)17; X86-NEXT: movaps (%esp), %xmm018; X86-NEXT: movl %ebp, %esp19; X86-NEXT: popl %ebp20; X86-NEXT: retl21;22; X64-LABEL: _mm_insert_epi16:23; X64: # %bb.0: # %entry24; X64-NEXT: # kill: def $esi killed $esi def $rsi25; X64-NEXT: andl $7, %esi26; X64-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)27; X64-NEXT: movw %di, -24(%rsp,%rsi,2)28; X64-NEXT: movaps -{{[0-9]+}}(%rsp), %xmm029; X64-NEXT: retq30entry:31 %conv = bitcast <2 x i64> %a to <8 x i16> ; <<8 x i16>> [#uses=1]32 %conv2 = trunc i32 %b to i16 ; <i16> [#uses=1]33 %and = and i32 %imm, 7 ; <i32> [#uses=1]34 %vecins = insertelement <8 x i16> %conv, i16 %conv2, i32 %and ; <<8 x i16>> [#uses=1]35 %conv6 = bitcast <8 x i16> %vecins to <2 x i64> ; <<2 x i64>> [#uses=1]36 ret <2 x i64> %conv637}38