[FastISel][X86] Emit more efficient instructions for integer constant materialization.
authorJuergen Ributzka <juergen@apple.com>
Wed, 13 Aug 2014 22:18:11 +0000 (22:18 +0000)
committerJuergen Ributzka <juergen@apple.com>
Wed, 13 Aug 2014 22:18:11 +0000 (22:18 +0000)
commitf245d9aa7753ee56f62bb83b69b77c1026816c60
treec99e2933d8bdece1663a26a9c69004ff451aad8b
parentdc408e806928e534d2925b06f638c4e381403f56
[FastISel][X86] Emit more efficient instructions for integer constant materialization.

This mostly affects the i64 value type, which always resulted in an 15byte
mobavsq instruction to materialize any constant. The custom code checks the
value of the immediate and tries to use a different and smaller mov
instruction when possible.

This fixes <rdar://problem/17420988>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215593 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FastISel.cpp
test/CodeGen/X86/object-size.ll
test/CodeGen/X86/xaluo.ll