diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-17 17:47:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-17 17:47:38 +0000 |
commit | 0a1c997c27706e315efb61b8b3e110d42cbaae64 (patch) | |
tree | 2500a0cef747db77484d7d4c86c879c7ea0abd92 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 685090f5988a03da1a515493bad1e592d26b9956 (diff) |
fix an x86 fast isel issue where we'd completely give up on folding an address
when we have a global variable base an an index. Instead, just give up on
folding the global variable.
Before we'd geenrate:
_test: ## @test
## BB#0:
movq _rtx_length@GOTPCREL(%rip), %rax
leaq (%rax), %rax
addq %rdi, %rax
movzbl (%rax), %eax
ret
now we generate:
_test: ## @test
## BB#0:
movq _rtx_length@GOTPCREL(%rip), %rax
movzbl (%rax,%rdi), %eax
ret
The difference is even more significant when there is a scale
involved.
This fixes rdar://9289558 - total fail with addr mode formation at -O0/x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
0 files changed, 0 insertions, 0 deletions