llvm-6502/test/CodeGen/X86/insertelement-legalize.ll
Mon P Wang d17c030276 Added support to LegalizeType for expanding the operands of scalar to vector
and insert vector element.  Modified extract vector element to extend the
result to match the expected promoted type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 06:57:02 +00:00

11 lines
383 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 -disable-mmx
; Test to check that we properly legalize an insert vector element
define void @test(<2 x i64> %val, <2 x i64>* %dst, i64 %x) nounwind {
entry:
%tmp4 = insertelement <2 x i64> %val, i64 %x, i32 0 ; <<2 x i64>> [#uses=1]
%add = add <2 x i64> %tmp4, %val ; <<2 x i64>> [#uses=1]
store <2 x i64> %add, <2 x i64>* %dst
ret void
}