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

Chad Rosier mcrosier at apple.com
Thu Mar 14 14:25:04 PDT 2013


Author: mcrosier
Date: Thu Mar 14 16:25:04 2013
New Revision: 177113

URL: http://llvm.org/viewvc/llvm-project?rev=177113&view=rev
Log:
[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle
the win64 calling convention.
rdar://13423768

Modified:
    llvm/trunk/lib/Target/X86/X86FastISel.cpp
    llvm/trunk/test/CodeGen/X86/fast-isel-args-fail.ll

Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=177113&r1=177112&r2=177113&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Mar 14 16:25:04 2013
@@ -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;

Modified: llvm/trunk/test/CodeGen/X86/fast-isel-args-fail.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-args-fail.ll?rev=177113&r1=177112&r2=177113&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-args-fail.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-args-fail.ll Thu Mar 14 16:25:04 2013
@@ -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
+}





More information about the llvm-commits mailing list