Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86] Teach fastisel to select calls to dllimport functions
Summary: Direct calls to dllimport functions are very common Windows. We should add them to the -O0 fast path. Reviewers: rafael Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D36197 llvm-svn: 310152
- Loading branch information
Showing
6 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
; RUN: llc -fast-isel -O0 -code-model=large -mcpu=generic -mtriple=x86_64-apple-darwin10 -relocation-model=pic < %s | FileCheck %s | ||
|
||
; Check that fast-isel cleans up when it fails to lower a call instruction. | ||
define void @fastiselcall() { | ||
entry: | ||
%call = call i32 @targetfn(i32 42) | ||
ret void | ||
; CHECK-LABEL: test5: | ||
; Local value area is still there: | ||
; CHECK: movl $42, {{%[a-z]+}} | ||
; Fast-ISel's arg mov is not here: | ||
; CHECK-NOT: movl $42, (%esp) | ||
; SDag-ISel's arg mov: | ||
; CHECK: movabsq $_targetfn, %[[REG:[^ ]*]] | ||
; CHECK: movl $42, %edi | ||
; CHECK: callq *%[[REG]] | ||
|
||
} | ||
declare i32 @targetfn(i32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters