aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-insert.ll
blob: d9eae03eee75423fbb4daefb892a244ba4454855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s

; It is faster to make two saves, if the data is already in XMM registers. For
; example, after making an integer operation.
define void @double_save(<4 x i32>* %Ap, <4 x i32>* %Bp, <8 x i32>* %P) nounwind ssp {
entry:
  ; CHECK: movaps
  ; CHECK: movaps
  ; CHECK: movaps
  ; CHECK: movaps
  %A = load <4 x i32>* %Ap
  %B = load <4 x i32>* %Bp
  %Z = shufflevector <4 x i32>%A, <4 x i32>%B, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  store <8 x i32> %Z, <8 x i32>* %P, align 16
  ret void
}