summaryrefslogtreecommitdiff
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorLouis Gerbarg <lgg@apple.com>2014-06-16 20:31:50 +0000
committerLouis Gerbarg <lgg@apple.com>2014-06-16 20:31:50 +0000
commit163eb0990cc466396ea9beb9a481c941a978b62a (patch)
treea27a02c6ca130517675ad941bcaa92424f24784e /lib/Target/X86
parentbaf9879290e81105719e15481c26749d82f32327 (diff)
downloadllvm-163eb0990cc466396ea9beb9a481c941a978b62a.tar.gz
llvm-163eb0990cc466396ea9beb9a481c941a978b62a.tar.bz2
llvm-163eb0990cc466396ea9beb9a481c941a978b62a.tar.xz
Improve comments for r211040
Added comment to clarify why we r211040 choose to bail out of fast isel instead of generating a more complicated relocation, and fix mislabelled register in the comments of the asan test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86FastISel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index 4b8a8362c5..e490c274b5 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -2709,7 +2709,10 @@ unsigned X86FastISel::TargetMaterializeConstant(const Constant *C) {
// Materialize addresses with LEA instructions.
if (isa<GlobalValue>(C)) {
- //LEA can only handle 32 bit immediates
+ // LEA can only handle 32 bit immediates. Currently this happens pretty
+ // rarely, so rather than deal with it just bail out of fast isel. If any
+ // architectures endis up needing to use this path a lot then fast isel
+ // could get the address with a MOV64ri and use that to load the value.
if (TM.getRelocationModel() == Reloc::Static && Subtarget->is64Bit())
return false;