[X86] PR26575: Fix LEA optimization pass.
authorAndrey Turetskiy <andrey.turetskiy@gmail.com>
Tue, 16 Feb 2016 12:47:45 +0000 (12:47 +0000)
committerAndrey Turetskiy <andrey.turetskiy@gmail.com>
Tue, 16 Feb 2016 12:47:45 +0000 (12:47 +0000)
commit1052ac231143159966348ab06b517a765cf7d92d
tree1cb3aeaaa7ee1e2c8220b4f07c355f3e7d535925
parent2c3ffc04f39d46f42c70dc52942e67fdb57eac7b
[X86] PR26575: Fix LEA optimization pass.

Add a missing check for a type of address displacement operand of the load/store instruction being a candidate for LEA substitution.

Ref: https://llvm.org/bugs/show_bug.cgi?id=26575

Differential Revision: http://reviews.llvm.org/D17261

llvm-svn: 260959
llvm/lib/Target/X86/X86OptimizeLEAs.cpp
llvm/test/CodeGen/X86/lea-opt-memop-check.ll [new file with mode: 0644]