[LLVMbugs] [Bug 22676] New: PC-relative address isn't used for x32
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 24 09:56:51 PST 2015
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: unassignedbugs at nondot.org
Reporter: hjl.tools at gmail.com
CC: llvmbugs at cs.uiuc.edu, michael.m.kuperstein at intel.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150224/2d843171/attachment.html>
More information about the llvm-bugs
mailing list