brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.8 KiB · d8882b0 Raw
161 lines · plain
1; RUN: sed -e "s/RETTYPE/void/;s/RETVAL//" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL,SSE,VOID %s2; RUN: sed -e "s/RETTYPE/i32/;s/RETVAL/undef/" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL,SSE,INT %s3; RUN: sed -e "s/RETTYPE/\{i64\,i64\}/;s/RETVAL/undef/" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL,SSE,INT128 %s4;5; RUN: sed -e "s/RETTYPE/void/;s/RETVAL//" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX,VOID %s6; RUN: sed -e "s/RETTYPE/i32/;s/RETVAL/undef/" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX,INT %s7; RUN: sed -e "s/RETTYPE/\{i64\,i64\}/;s/RETVAL/undef/" %s | llc -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX,INT128 %s8 9define preserve_allcc RETTYPE @preserve_allcc1(i64, i64, double, double) nounwind {10entry:11;ALL-LABEL:   preserve_allcc112;ALL:         pushq %r1013;ALL-NEXT:    pushq %r914;ALL-NEXT:    pushq %r815;ALL-NEXT:    pushq %rdi16;ALL-NEXT:    pushq %rsi17;VOID-NEXT:   pushq %rdx18;INT-NEXT:    pushq %rdx19;INT128-NOT:  pushq %rdx20;ALL-NEXT:    pushq %rcx21;VOID-NEXT:   pushq %rax22;INT-NOT:     pushq %rax23;INT128-NOT:  pushq %rax24;ALL-NEXT:    pushq %rbp25;ALL-NEXT:    pushq %r1526;ALL-NEXT:    pushq %r1427;ALL-NEXT:    pushq %r1328;ALL-NEXT:    pushq %r1229;ALL-NEXT:    pushq %rbx30;SSE:         movaps %xmm1531;SSE-NEXT:    movaps %xmm1432;SSE-NEXT:    movaps %xmm1333;SSE-NEXT:    movaps %xmm1234;SSE-NEXT:    movaps %xmm1135;SSE-NEXT:    movaps %xmm1036;SSE-NEXT:    movaps %xmm937;SSE-NEXT:    movaps %xmm838;SSE-NEXT:    movaps %xmm739;SSE-NEXT:    movaps %xmm640;SSE-NEXT:    movaps %xmm541;SSE-NEXT:    movaps %xmm442;SSE-NEXT:    movaps %xmm343;SSE-NEXT:    movaps %xmm244;SSE-NEXT:    movaps %xmm145;SSE-NEXT:    movaps %xmm046;AVX:         vmovups %ymm1547;AVX-NEXT:    vmovups %ymm1448;AVX-NEXT:    vmovups %ymm1349;AVX-NEXT:    vmovups %ymm1250;AVX-NEXT:    vmovups %ymm1151;AVX-NEXT:    vmovups %ymm1052;AVX-NEXT:    vmovups %ymm953;AVX-NEXT:    vmovups %ymm854;AVX-NEXT:    vmovups %ymm755;AVX-NEXT:    vmovups %ymm656;AVX-NEXT:    vmovups %ymm557;AVX-NEXT:    vmovups %ymm458;AVX-NEXT:    vmovups %ymm359;AVX-NEXT:    vmovups %ymm260;AVX-NEXT:    vmovups %ymm161;AVX-NEXT:    vmovups %ymm062;SSE:         movaps {{.*}} %xmm063;SSE-NEXT:    movaps {{.*}} %xmm164;SSE-NEXT:    movaps {{.*}} %xmm265;SSE-NEXT:    movaps {{.*}} %xmm366;SSE-NEXT:    movaps {{.*}} %xmm467;SSE-NEXT:    movaps {{.*}} %xmm568;SSE-NEXT:    movaps {{.*}} %xmm669;SSE-NEXT:    movaps {{.*}} %xmm770;SSE-NEXT:    movaps {{.*}} %xmm871;SSE-NEXT:    movaps {{.*}} %xmm972;SSE-NEXT:    movaps {{.*}} %xmm1073;SSE-NEXT:    movaps {{.*}} %xmm1174;SSE-NEXT:    movaps {{.*}} %xmm1275;SSE-NEXT:    movaps {{.*}} %xmm1376;SSE-NEXT:    movaps {{.*}} %xmm1477;SSE-NEXT:    movaps {{.*}} %xmm1578;AVX:         vmovups {{.*}} %ymm079;AVX-NEXT:    vmovups {{.*}} %ymm180;AVX-NEXT:    vmovups {{.*}} %ymm281;AVX-NEXT:    vmovups {{.*}} %ymm382;AVX-NEXT:    vmovups {{.*}} %ymm483;AVX-NEXT:    vmovups {{.*}} %ymm584;AVX-NEXT:    vmovups {{.*}} %ymm685;AVX-NEXT:    vmovups {{.*}} %ymm786;AVX-NEXT:    vmovups {{.*}} %ymm887;AVX-NEXT:    vmovups {{.*}} %ymm988;AVX-NEXT:    vmovups {{.*}} %ymm1089;AVX-NEXT:    vmovups {{.*}} %ymm1190;AVX-NEXT:    vmovups {{.*}} %ymm1291;AVX-NEXT:    vmovups {{.*}} %ymm1392;AVX-NEXT:    vmovups {{.*}} %ymm1493;AVX-NEXT:    vmovups {{.*}} %ymm1594;ALL:         popq    %rbx95;ALL-NEXT:    popq    %r1296;ALL-NEXT:    popq    %r1397;ALL-NEXT:    popq    %r1498;ALL-NEXT:    popq    %r1599;ALL-NEXT:    popq    %rbp100;VOID-NEXT:   popq    %rax101;INT-NOT:     popq    %rax102;INT128-NOT:  popq    %rax103;ALL-NEXT:    popq    %rcx104;VOID-NEXT:   popq    %rdx105;INT-NEXT:    popq    %rdx106;INT128-NOT:  popq    %rdx107;ALL-NEXT:    popq    %rsi108;ALL-NEXT:    popq    %rdi109;ALL-NEXT:    popq    %r8110;ALL-NEXT:    popq    %r9111;ALL-NEXT:    popq    %r10112  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}"()113  ret RETTYPE RETVAL114}115 116; Make sure R11 and return registers are saved before the call117declare preserve_allcc RETTYPE @bar(i64, i64, double, double)118define void @preserve_allcc2() nounwind {119entry:120;ALL-LABEL: preserve_allcc2121;VOID-NOT:  movq %rax, [[REG1:%[a-z0-9]+]]122;INT:       movq %rax, [[REG1:%[a-z0-9]+]]123;INT128:    movq %rax, [[REG1:%[a-z0-9]+]]124;VOID-NOT:  movq %rdx, [[REG2:%[a-z0-9]+]]125;INT-NOT:   movq %rdx, [[REG2:%[a-z0-9]+]]126;INT128:    movq %rdx, [[REG2:%[a-z0-9]+]]127;ALL:       movq %r11, [[REG3:%[a-z0-9]+]]128;ALL-NOT:   movaps %xmm129;VOID-NOT:  movq {{.*}}, %rax130;INT:       movq [[REG1]], %rax131;INT128:    movq [[REG1]], %rax132;VOID-NOT:  movq {{.*}}, %rdx133;INT-NOT:   movq {{.*}}, %rdx134;INT128:    movq [[REG2]], %rdx135;ALL:       movq [[REG3]], %r11136  %a0 = call i64 asm sideeffect "", "={rax}"() nounwind137  %a1 = call i64 asm sideeffect "", "={rcx}"() nounwind138  %a2 = call i64 asm sideeffect "", "={rdx}"() nounwind139  %a3 = call i64 asm sideeffect "", "={r8}"() nounwind140  %a4 = call i64 asm sideeffect "", "={r9}"() nounwind141  %a5 = call i64 asm sideeffect "", "={r10}"() nounwind142  %a6 = call i64 asm sideeffect "", "={r11}"() nounwind143  %a10 = call <2 x double> asm sideeffect "", "={xmm2}"() nounwind144  %a11 = call <2 x double> asm sideeffect "", "={xmm3}"() nounwind145  %a12 = call <2 x double> asm sideeffect "", "={xmm4}"() nounwind146  %a13 = call <2 x double> asm sideeffect "", "={xmm5}"() nounwind147  %a14 = call <2 x double> asm sideeffect "", "={xmm6}"() nounwind148  %a15 = call <2 x double> asm sideeffect "", "={xmm7}"() nounwind149  %a16 = call <2 x double> asm sideeffect "", "={xmm8}"() nounwind150  %a17 = call <2 x double> asm sideeffect "", "={xmm9}"() nounwind151  %a18 = call <2 x double> asm sideeffect "", "={xmm10}"() nounwind152  %a19 = call <2 x double> asm sideeffect "", "={xmm11}"() nounwind153  %a20 = call <2 x double> asm sideeffect "", "={xmm12}"() nounwind154  %a21 = call <2 x double> asm sideeffect "", "={xmm13}"() nounwind155  %a22 = call <2 x double> asm sideeffect "", "={xmm14}"() nounwind156  %a23 = call <2 x double> asm sideeffect "", "={xmm15}"() nounwind157  call preserve_allcc RETTYPE @bar(i64 1, i64 2, double 3.0, double 4.0)158  call void asm sideeffect "", "{rax},{rcx},{rdx},{r8},{r9},{r10},{r11},{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)159  ret void160}161