1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL,SSE %s
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX %s
4 define preserve_allcc double @preserve_allcc1() nounwind {
6 ;ALL-LABEL: preserve_allcc1
10 ;AVX-NOT: vmovups %ymm0
11 ;SSE-NOT: movaps {{.*}} %xmm0
12 ;SSE: movaps {{.*}} %xmm1
13 ;AVX-NOT: vmovups {{.*}} %ymm0
14 ;AVX: vmovups {{.*}} %ymm1
15 call void asm sideeffect "", "~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{rbp},~{xmm0},~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15}"()
19 ; Make sure XMM0 (return register) and R11 are saved before the call
20 declare preserve_allcc double @bar_double(i64, i64)
21 define void @preserve_allcc2() nounwind {
23 ;SSE-LABEL: preserve_allcc2
24 ;SSE: movq %r11, [[REG1:%[a-z0-9]+]]
25 ;SSE: movaps %xmm0, [[REG2:[-0-9]*\(%r[sb]p\)]]
26 ;SSE: movq [[REG1]], %r11
27 ;SSE: movaps [[REG2]], %xmm0
28 %a0 = call i64 asm sideeffect "", "={rax}"() nounwind
29 %a1 = call i64 asm sideeffect "", "={rcx}"() nounwind
30 %a2 = call i64 asm sideeffect "", "={rdx}"() nounwind
31 %a3 = call i64 asm sideeffect "", "={r8}"() nounwind
32 %a4 = call i64 asm sideeffect "", "={r9}"() nounwind
33 %a5 = call i64 asm sideeffect "", "={r10}"() nounwind
34 %a6 = call i64 asm sideeffect "", "={r11}"() nounwind
35 %a10 = call <2 x double> asm sideeffect "", "={xmm0}"() nounwind
36 %a11 = call <2 x double> asm sideeffect "", "={xmm1}"() nounwind
37 %a12 = call <2 x double> asm sideeffect "", "={xmm2}"() nounwind
38 %a13 = call <2 x double> asm sideeffect "", "={xmm3}"() nounwind
39 %a14 = call <2 x double> asm sideeffect "", "={xmm4}"() nounwind
40 %a15 = call <2 x double> asm sideeffect "", "={xmm5}"() nounwind
41 %a16 = call <2 x double> asm sideeffect "", "={xmm6}"() nounwind
42 %a17 = call <2 x double> asm sideeffect "", "={xmm7}"() nounwind
43 %a18 = call <2 x double> asm sideeffect "", "={xmm8}"() nounwind
44 %a19 = call <2 x double> asm sideeffect "", "={xmm9}"() nounwind
45 %a20 = call <2 x double> asm sideeffect "", "={xmm10}"() nounwind
46 %a21 = call <2 x double> asm sideeffect "", "={xmm11}"() nounwind
47 %a22 = call <2 x double> asm sideeffect "", "={xmm12}"() nounwind
48 %a23 = call <2 x double> asm sideeffect "", "={xmm13}"() nounwind
49 %a24 = call <2 x double> asm sideeffect "", "={xmm14}"() nounwind
50 %a25 = call <2 x double> asm sideeffect "", "={xmm15}"() nounwind
51 call preserve_allcc double @bar_double(i64 1, i64 2)
52 call void asm sideeffect "", "{rax},{rcx},{rdx},{r8},{r9},{r10},{r11},{xmm0},{xmm1},{xmm2},{xmm3},{xmm4},{xmm5},{xmm6},{xmm7},{xmm8},{xmm9},{xmm10},{xmm11},{xmm12},{xmm13},{xmm14},{xmm15}"(i64 %a0, i64 %a1, i64 %a2, i64 %a3, i64 %a4, i64 %a5, i64 %a6, <2 x double> %a10, <2 x double> %a11, <2 x double> %a12, <2 x double> %a13, <2 x double> %a14, <2 x double> %a15, <2 x double> %a16, <2 x double> %a17, <2 x double> %a18, <2 x double> %a19, <2 x double> %a20, <2 x double> %a21, <2 x double> %a22, <2 x double> %a23, <2 x double> %a24, <2 x double> %a25)