Merging r261039:
[oota-llvm.git] / test / CodeGen / X86 / 2009-06-05-VariableIndexInsert.ll
1 ; RUN: llc < %s
2 ; REQUIRES: default_triple
3
4 define <2 x i64> @_mm_insert_epi16(<2 x i64> %a, i32 %b, i32 %imm) nounwind readnone {
5 entry:
6         %conv = bitcast <2 x i64> %a to <8 x i16>               ; <<8 x i16>> [#uses=1]
7         %conv2 = trunc i32 %b to i16            ; <i16> [#uses=1]
8         %and = and i32 %imm, 7          ; <i32> [#uses=1]
9         %vecins = insertelement <8 x i16> %conv, i16 %conv2, i32 %and           ; <<8 x i16>> [#uses=1]
10         %conv6 = bitcast <8 x i16> %vecins to <2 x i64>         ; <<2 x i64>> [#uses=1]
11         ret <2 x i64> %conv6
12 }