1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s
4 ; Test to check that we properly legalize an insert vector element
5 define void @test(<2 x i64> %val, <2 x i64>* %dst, i64 %x) nounwind {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: pushl %edi
9 ; CHECK-NEXT: pushl %esi
10 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
11 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
12 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edx
13 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
14 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edi
15 ; CHECK-NEXT: addl {{[0-9]+}}(%esp), %esi
16 ; CHECK-NEXT: adcl {{[0-9]+}}(%esp), %edi
17 ; CHECK-NEXT: addl %ecx, %ecx
18 ; CHECK-NEXT: adcl %edx, %edx
19 ; CHECK-NEXT: movl %ecx, 8(%eax)
20 ; CHECK-NEXT: movl %esi, (%eax)
21 ; CHECK-NEXT: movl %edx, 12(%eax)
22 ; CHECK-NEXT: movl %edi, 4(%eax)
23 ; CHECK-NEXT: popl %esi
24 ; CHECK-NEXT: popl %edi
27 %tmp4 = insertelement <2 x i64> %val, i64 %x, i32 0 ; <<2 x i64>> [#uses=1]
28 %add = add <2 x i64> %tmp4, %val ; <<2 x i64>> [#uses=1]
29 store <2 x i64> %add, <2 x i64>* %dst