OSDN Git Service

reimplement the second half of the or/add optimization. We should now
authorChris Lattner <sabre@nondot.org>
Fri, 8 Oct 2010 01:05:10 +0000 (01:05 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 8 Oct 2010 01:05:10 +0000 (01:05 +0000)
commitcd3167b281f08e47a81438718122b6dd75a6316e
tree1312fbde7f2a4c47d05bf5d70e48e04dfa5ac10d
parent0f448b5bf682c16c23c7ec239eb74f08d333e8c1
reimplement the second half of the or/add optimization.  We should now
only end up emitting LEA instead of OR.  If we aren't able to promote
something into an LEA, we should never be emitting it as an ADD.

Add some testcases that we emit "or" in cases where we used to produce
an "add".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116026 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86MCInstLower.cpp
test/CodeGen/X86/3addr-or.ll