mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
0a9a1968f9
Don't try to generate large PIC code for non-ELF targets. Neither COFF nor MachO have relocations for large position independent code, and users have been using "large PIC" code models to JIT 64-bit code for a while now. With this change, if they are generating ELF code, their JITed code will truly be PIC, but if they target MachO or COFF, it will contain 64-bit immediates that directly reference external symbols. For a JIT, that's perfectly fine. llvm-svn: 337740
18 lines
567 B
LLVM
18 lines
567 B
LLVM
; RUN: llc -fast-isel-sink-local-values -fast-isel -O0 -code-model=large -mcpu=generic -mtriple=x86_64-linux -relocation-model=static < %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: fastiselcall:
|
|
; FastISel's local value code was dead, so it's gone.
|
|
; CHECK-NOT: movl $42,
|
|
; SDag-ISel's arg mov:
|
|
; CHECK: movabsq $targetfn, %[[REG:[^ ]*]]
|
|
; CHECK: movl $42, %edi
|
|
; CHECK: callq *%[[REG]]
|
|
|
|
}
|
|
declare i32 @targetfn(i32)
|