summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp5
-rw-r--r--llvm/test/DebugInfo/X86/debug-loc-asan.ll4
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 4b8a8362c5a..e490c274b5f 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/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;
diff --git a/llvm/test/DebugInfo/X86/debug-loc-asan.ll b/llvm/test/DebugInfo/X86/debug-loc-asan.ll
index 8730cf9d361..0e02c678717 100644
--- a/llvm/test/DebugInfo/X86/debug-loc-asan.ll
+++ b/llvm/test/DebugInfo/X86/debug-loc-asan.ll
@@ -9,7 +9,7 @@
; }
; with "clang++ -S -emit-llvm -fsanitize=address -O0 -g test.cc"
-; First, argument variable "y" resides in %rdi:
+; First, argument variable "y" resides in %rdx:
; CHECK: DEBUG_VALUE: bar:y <- RDX
; Then its address is stored in a location on a stack:
@@ -21,7 +21,7 @@
; CHECK: .Ldebug_loc{{[0-9]+}}:
; We expect two location ranges for the variable.
-; First, it is stored in %rdi:
+; First, it is stored in %rdx:
; CHECK: .Lset{{[0-9]+}} = .Lfunc_begin0-.Lfunc_begin0
; CHECK-NEXT: .quad .Lset{{[0-9]+}}
; CHECK-NEXT: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0
OpenPOWER on IntegriCloud