mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
fix fastisel to handle GS and FS relative pointers. Patch by
Nelson Elhage! llvm-svn: 106031
This commit is contained in:
parent
56db632295
commit
48961d3ca6
@ -349,6 +349,11 @@ bool X86FastISel::X86SelectAddress(const Value *V, X86AddressMode &AM) {
|
||||
U = C;
|
||||
}
|
||||
|
||||
if (const PointerType *Ty = dyn_cast<PointerType>(V->getType()))
|
||||
if (Ty->getAddressSpace() > 255)
|
||||
// Fast instruction selection doesn't support pointers through %fs or %gs
|
||||
return false;
|
||||
|
||||
switch (Opcode) {
|
||||
default: break;
|
||||
case Instruction::BitCast:
|
||||
|
6
test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
Normal file
6
test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llc -fast-isel -march=x86 < %s | grep %fs:
|
||||
|
||||
define i32 @test1(i32 addrspace(257)* %arg) nounwind {
|
||||
%tmp = load i32 addrspace(257)* %arg
|
||||
ret i32 %tmp
|
||||
}
|
Loading…
Reference in New Issue
Block a user