1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle

the win64 calling convention.
rdar://13423768

llvm-svn: 177113
This commit is contained in:
Chad Rosier 2013-03-14 21:25:04 +00:00
parent d133b52150
commit aca0d2a5a0
2 changed files with 13 additions and 0 deletions

View File

@ -1526,6 +1526,9 @@ bool X86FastISel::FastLowerArguments() {
if (!FuncInfo.CanLowerReturn)
return false;
if (Subtarget->isTargetWindows())
return false;
const Function *F = FuncInfo.Fn;
if (F->isVarArg())
return false;

View File

@ -1,4 +1,5 @@
; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-apple-darwin10
; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-pc-win32 | FileCheck %s
; Requires: Asserts
; Previously, this would cause an assert.
@ -8,3 +9,12 @@ entry:
%add1 = add nsw i31 %add, %c
ret i31 %add1
}
; We don't handle the Windows CC, yet.
define i32 @foo(i32* %p) {
entry:
; CHECK: foo
; CHECK: movl (%rcx), %eax
%0 = load i32* %p, align 4
ret i32 %0
}