1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -mattr=-sse2,+sse | FileCheck %s
4 ; PR10497 + another isel issue with sse2 disabled
5 ; (This is primarily checking that this construct doesn't crash.)
6 define void @a(ptr %a, ptr %b) {
9 ; CHECK-NEXT: subl $8, %esp
10 ; CHECK-NEXT: .cfi_def_cfa_offset 12
11 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
12 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
13 ; CHECK-NEXT: xorps %xmm0, %xmm0
14 ; CHECK-NEXT: movlps {{.*#+}} xmm0 = mem[0,1],xmm0[2,3]
15 ; CHECK-NEXT: addps %xmm0, %xmm0
16 ; CHECK-NEXT: movss %xmm0, {{[0-9]+}}(%esp)
17 ; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,1,1]
18 ; CHECK-NEXT: movss %xmm0, (%esp)
19 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
20 ; CHECK-NEXT: movl (%esp), %edx
21 ; CHECK-NEXT: addl %edx, %edx
22 ; CHECK-NEXT: addl %ecx, %ecx
23 ; CHECK-NEXT: movl %ecx, (%eax)
24 ; CHECK-NEXT: movl %edx, 4(%eax)
25 ; CHECK-NEXT: addl $8, %esp
26 ; CHECK-NEXT: .cfi_def_cfa_offset 4
28 %cc = load <2 x float>, ptr %a
29 %c = fadd <2 x float> %cc, %cc
30 %dd = bitcast <2 x float> %c to <2 x i32>
31 %d = add <2 x i32> %dd, %dd
32 store <2 x i32> %d, ptr %b