OSDN Git Service

[X86] Optimization for replacing LEA with MOV at frame index elimination time
authorZvi Rackover <zvi.rackover@intel.com>
Mon, 26 Sep 2016 06:42:07 +0000 (06:42 +0000)
committerZvi Rackover <zvi.rackover@intel.com>
Mon, 26 Sep 2016 06:42:07 +0000 (06:42 +0000)
commit9209299b97428cbc58ac68152850f445024ff96c
tree6962ce1b50f1a12bafd883877254b405b563ff5b
parent56b0418212d9102c3dbc3db8ae2b8f0a63d75d2a
[X86] Optimization for replacing LEA with MOV at frame index elimination time

Summary:
Replace a LEA instruction of the form 'lea (%esp), %ebx' --> 'mov %esp, %ebx'

MOV is preferable over LEA because usually there are more issue-slots available to execute MOVs than LEAs. Latest processors also support zero-latency MOVs.

Fixes pr29022.

Reviewers: hfinkel, delena, igorb, myatsina, mkuper

Differential Revision: https://reviews.llvm.org/D24705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282385 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
lib/Target/X86/X86RegisterInfo.cpp
test/CodeGen/X86/avx-intel-ocl.ll
test/CodeGen/X86/avx512-intel-ocl.ll
test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll
test/CodeGen/X86/dynamic-allocas-VLAs.ll
test/CodeGen/X86/extractelement-index.ll
test/CodeGen/X86/fast-isel-x86-64.ll
test/CodeGen/X86/fast-isel-x86.ll
test/CodeGen/X86/frameaddr.ll
test/CodeGen/X86/lea-opt-memop-check-1.ll
test/CodeGen/X86/local_stack_symbol_ordering.ll
test/CodeGen/X86/pr29022.ll [new file with mode: 0644]
test/CodeGen/X86/sse-intel-ocl.ll
test/CodeGen/X86/sse-intrinsics-fast-isel.ll
test/CodeGen/X86/swift-return.ll
test/CodeGen/X86/win32_sret.ll
test/CodeGen/X86/win64_frame.ll
test/DebugInfo/COFF/inlining.ll