1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -O0 | FileCheck %s
4 @b = external global i64, align 8
6 define void @foo(i1 %c, <2 x i64> %x) {
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: # kill: def $dil killed $dil killed $edi
10 ; CHECK-NEXT: movq %xmm0, %rax
11 ; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
12 ; CHECK-NEXT: movq %xmm0, %rcx
13 ; CHECK-NEXT: movb %dil, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill
14 ; CHECK-NEXT: movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill
15 ; CHECK-NEXT: .LBB0_1: # %for.body
16 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
17 ; CHECK-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload
18 ; CHECK-NEXT: testb $1, %al
19 ; CHECK-NEXT: jne .LBB0_1
20 ; CHECK-NEXT: jmp .LBB0_2
21 ; CHECK-NEXT: .LBB0_2: # %for.end
22 ; CHECK-NEXT: movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload
23 ; CHECK-NEXT: movq %rax, b
26 %0 = bitcast <2 x i64> %x to i128
29 for.body: ; preds = %for.body, %entry
30 br i1 %c, label %for.body, label %for.end
32 for.end: ; preds = %for.body
34 %2 = trunc i128 %1 to i64
35 store i64 %2, i64* @b, align 8