http://llvm.org/bugs/show_bug.cgi?id=22676
Bug ID: 22676
Summary: PC-relative address isn't used for x32
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
X86DAGToDAGISel::SelectTLSADDRAddr has
if (N.getValueType() == MVT::i32) {
AM.Scale = 1;
AM.IndexReg = CurDAG->getRegister(X86::EBX, MVT::i32);
} else {
AM.IndexReg = CurDAG->getRegister(0, MVT::i64);
}
N.getValueType() returns MVT::i32 for x32. One way to fix it
is to check Subtarget->is64Bit() and use
AM.IndexReg = CurDAG->getRegister(0, N.getValueType());
for 64-bit target.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs