forked from OSchip/llvm-project
fix fastisel to handle GS and FS relative pointers. Patch by
Nelson Elhage! llvm-svn: 106031
This commit is contained in:
parent
f3f7a770b7
commit
874c92bd47
|
@ -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:
|
||||
|
|
|
@ -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