1 ; RUN: llc -mtriple=i686-pc-win32 -mattr=+sse2 < %s | FileCheck %s --check-prefix=CHECK --check-prefix=X86
2 ; RUN: llc -mtriple=x86_64-pc-win32 < %s | FileCheck %s --check-prefix=CHECK --check-prefix=X64
4 ; Test integer arguments.
6 define x86_vectorcallcc i32 @test_int_1() {
10 ; CHECK-LABEL: {{^}}test_int_1@@0:
11 ; CHECK: xorl %eax, %eax
13 define x86_vectorcallcc i32 @test_int_2(i32 inreg %a) {
17 ; X86-LABEL: {{^}}test_int_2@@4:
18 ; X64-LABEL: {{^}}test_int_2@@8:
19 ; CHECK: movl %ecx, %eax
21 define x86_vectorcallcc i32 @test_int_3(i64 inreg %a) {
22 %at = trunc i64 %a to i32
26 ; X86-LABEL: {{^}}test_int_3@@8:
27 ; X64-LABEL: {{^}}test_int_3@@8:
28 ; CHECK: movl %ecx, %eax
30 define x86_vectorcallcc i32 @test_int_4(i32 inreg %a, i32 inreg %b) {
35 ; X86-LABEL: {{^}}test_int_4@@8:
36 ; X86: leal (%ecx,%edx), %eax
38 ; X64-LABEL: {{^}}test_int_4@@16:
39 ; X64: leal (%rcx,%rdx), %eax
41 define x86_vectorcallcc i32 @"\01test_int_5"(i32, i32) {
44 ; CHECK-LABEL: {{^}}test_int_5:
46 define x86_vectorcallcc double @test_fp_1(double %a, double %b) {
49 ; CHECK-LABEL: {{^}}test_fp_1@@16:
50 ; CHECK: movaps %xmm1, %xmm0
52 define x86_vectorcallcc double @test_fp_2(
53 double, double, double, double, double, double, double %r) {
56 ; CHECK-LABEL: {{^}}test_fp_2@@56:
57 ; CHECK: movsd {{[0-9]+\(%[re]sp\)}}, %xmm0
59 define x86_vectorcallcc {double, double, double, double} @test_fp_3() {
60 ret {double, double, double, double}
61 { double 0.0, double 0.0, double 0.0, double 0.0 }
63 ; CHECK-LABEL: {{^}}test_fp_3@@0:
69 ; FIXME: Returning via x87 isn't compatible, but its hard to structure the
70 ; tablegen any other way.
71 define x86_vectorcallcc {double, double, double, double, double} @test_fp_4() {
72 ret {double, double, double, double, double}
73 { double 0.0, double 0.0, double 0.0, double 0.0, double 0.0 }
75 ; CHECK-LABEL: {{^}}test_fp_4@@0:
82 define x86_vectorcallcc <16 x i8> @test_vec_1(<16 x i8> %a, <16 x i8> %b) {
85 ; CHECK-LABEL: {{^}}test_vec_1@@32:
86 ; CHECK: movaps %xmm1, %xmm0
88 define x86_vectorcallcc <16 x i8> @test_vec_2(
89 double, <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> %r) {
92 ; CHECK-LABEL: {{^}}test_vec_2@@104:
93 ; CHECK: movaps (%{{[re]}}cx), %xmm0