X86 Peephole: fold loads to the source register operand if possible.
authorManman Ren <mren@apple.com>
Thu, 2 Aug 2012 00:56:42 +0000 (00:56 +0000)
committerManman Ren <mren@apple.com>
Thu, 2 Aug 2012 00:56:42 +0000 (00:56 +0000)
commitd7d003c2b7b7f657eed364e4ac06f4ab32fc8c2d
treea135e2b9b794ea8b4b12c05e4a2a768d32577f59
parente5c79a5c2542fa0d852df28b5ee9de8dfef694d8
X86 Peephole: fold loads to the source register operand if possible.

Machine CSE and other optimizations can remove instructions so folding
is possible at peephole while not possible at ISel.

This patch is a rework of r160919 and was tested on clang self-host on my local
machine.

rdar://10554090 and rdar://11873276

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161152 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/PeepholeOptimizer.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
test/CodeGen/X86/2012-05-19-avx2-store.ll
test/CodeGen/X86/break-sse-dep.ll
test/CodeGen/X86/fold-load.ll
test/CodeGen/X86/fold-pcmpeqd-1.ll
test/CodeGen/X86/sse-minmax.ll
test/CodeGen/X86/vec_compare.ll