[X86] Use push-pop for materializing small constants under 'minsize'
authorHans Wennborg <hans@hanshq.net>
Thu, 17 Dec 2015 23:18:39 +0000 (23:18 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 17 Dec 2015 23:18:39 +0000 (23:18 +0000)
commit449ad4ca3bfe098003a3acc098e3836b39033da4
treeb11c443995730763f78e2adfb1808c6d2c5e001f
parent4c241849363d510a5d63c1c78989ef1fa15c1565
[X86] Use push-pop for materializing small constants under 'minsize'

Use the 3-byte (4 with REX prefix) push-pop sequence for materializing
small constants. This is smaller than using a mov (5, 6 or 7 bytes
depending on size and REX prefix), but it's likely to be slower, so
only used for 'minsize'.

This is a follow-up to r255656.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255936 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/materialize-one.ll [deleted file]
test/CodeGen/X86/materialize.ll [new file with mode: 0644]
test/CodeGen/X86/powi.ll