Skip to content

Commit

Permalink
Improve comments for r211040
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lgerbarg committed Jun 16, 2014
1 parent baf9879 commit 163eb09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/Target/X86/X86FastISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions test/DebugInfo/X86/debug-loc-asan.ll
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 163eb09

Please sign in to comment.