[llvm-commits] [llvm] r149494 - in /llvm/trunk: lib/Target/X86/X86CallingConv.td test/CodeGen/X86/avx-win64-args.ll test/CodeGen/X86/avx-win64.ll
Elena Demikhovsky
elena.demikhovsky at intel.com
Wed Feb 1 02:46:14 PST 2012
Author: delena
Date: Wed Feb 1 04:46:14 2012
New Revision: 149494
URL: http://llvm.org/viewvc/llvm-project?rev=149494&view=rev
Log:
Passing AVX 256-bit structures in Win64 was wrong.
Fixed Win64 calling conventions.
Added:
llvm/trunk/test/CodeGen/X86/avx-win64-args.ll (with props)
Modified:
llvm/trunk/lib/Target/X86/X86CallingConv.td
llvm/trunk/test/CodeGen/X86/avx-win64.ll
Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=149494&r1=149493&r2=149494&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/trunk/lib/Target/X86/X86CallingConv.td Wed Feb 1 04:46:14 2012
@@ -198,6 +198,10 @@
// 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>>,
Added: llvm/trunk/test/CodeGen/X86/avx-win64-args.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-win64-args.ll?rev=149494&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-win64-args.ll (added)
+++ llvm/trunk/test/CodeGen/X86/avx-win64-args.ll Wed Feb 1 04:46:14 2012
@@ -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
+}
+
Propchange: llvm/trunk/test/CodeGen/X86/avx-win64-args.ll
------------------------------------------------------------------------------
svn:executable = *
Modified: llvm/trunk/test/CodeGen/X86/avx-win64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-win64.ll?rev=149494&r1=149493&r2=149494&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-win64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-win64.ll Wed Feb 1 04:46:14 2012
@@ -9,7 +9,6 @@
; CHECK: f___vyf
; CHECK: pushq %rbp
-; CHECK-NOT: vmovaps{{.*}}(%r
; CHECK: vmovmsk
; CHECK: vmovaps %ymm{{.*}}(%r
; CHECK: vmovaps %ymm{{.*}}(%r
More information about the llvm-commits
mailing list