forked from OSchip/llvm-project
[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle
the win64 calling convention. rdar://13423768 llvm-svn: 177113
This commit is contained in:
parent
4e67cba8a6
commit
4b54f594b4
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue