1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Passing AVX 256-bit structures in Win64 was wrong.

Fixed Win64 calling conventions.

llvm-svn: 149494
This commit is contained in:
Elena Demikhovsky 2012-02-01 10:46:14 +00:00
parent f63bfb1b5d
commit 455db87d41
3 changed files with 22 additions and 1 deletions

View File

@ -198,6 +198,10 @@ def CC_X86_Win64_C : CallingConv<[
// 128 bit vectors are passed by pointer
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCPassIndirect<i64>>,
// 256 bit vectors are passed by pointer
CCIfType<[v32i8, v16i16, v8i32, v4i64, v8f32, v4f64], CCPassIndirect<i64>>,
// The first 4 MMX vector arguments are passed in GPRs.
CCIfType<[x86mmx], CCBitConvertToType<i64>>,

View File

@ -0,0 +1,18 @@
; RUN: llc < %s -mcpu=corei7-avx -mattr=+avx | FileCheck %s
target triple = "x86_64-pc-win32"
declare <8 x float> @foo(<8 x float>, i32)
define <8 x float> @test1(<8 x float> %x, <8 x float> %y) nounwind uwtable readnone ssp {
entry:
; CHECK: test1
; CHECK: leaq {{.*}}, %rcx
; CHECK: movl {{.*}}, %edx
; CHECK: call
; CHECK: ret
%x1 = fadd <8 x float> %x, %y
%call = call <8 x float> @foo(<8 x float> %x1, i32 1) nounwind
%y1 = fsub <8 x float> %call, %y
ret <8 x float> %y1
}

View File

@ -9,7 +9,6 @@ target triple = "x86_64-pc-win32"
; CHECK: f___vyf
; CHECK: pushq %rbp
; CHECK-NOT: vmovaps{{.*}}(%r
; CHECK: vmovmsk
; CHECK: vmovaps %ymm{{.*}}(%r
; CHECK: vmovaps %ymm{{.*}}(%r