1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
5 define i32 @foo(i64* nocapture %perm, i32 %n) {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: movl %esi, %eax
9 ; CHECK-NEXT: movl $1, %ecx
10 ; CHECK-NEXT: movq %rcx, %xmm0
11 ; CHECK-NEXT: pslldq {{.*#+}} xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
12 ; CHECK-NEXT: movl %esi, %ecx
13 ; CHECK-NEXT: andl $1, %ecx
14 ; CHECK-NEXT: movdqa {{.*#+}} xmm1 = [2,3]
15 ; CHECK-NEXT: .p2align 4, 0x90
16 ; CHECK-NEXT: .LBB0_1: # %body
17 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
18 ; CHECK-NEXT: movdqa %xmm0, -{{[0-9]+}}(%rsp)
19 ; CHECK-NEXT: movq -24(%rsp,%rcx,8), %rdx
20 ; CHECK-NEXT: movdqu %xmm0, (%rdi,%rdx,8)
21 ; CHECK-NEXT: testq %rdx, %rdx
22 ; CHECK-NEXT: movdqa %xmm1, %xmm0
23 ; CHECK-NEXT: jne .LBB0_1
24 ; CHECK-NEXT: # %bb.2: # %exit
25 ; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
31 %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %entry ], [ <i64 2, i64 3>, %body ]
32 %l13 = extractelement <2 x i64> %vec.ind, i32 %n
33 %l14 = getelementptr inbounds i64, i64* %perm, i64 %l13
34 %l15 = bitcast i64* %l14 to <2 x i64>*
35 store <2 x i64> %vec.ind, <2 x i64>* %l15, align 8
36 %niter.ncmp.3 = icmp eq i64 %l13, 0
37 br i1 %niter.ncmp.3, label %exit, label %body