X86: Shrink certain forms of movsx.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 12 Jul 2013 18:06:44 +0000 (18:06 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 12 Jul 2013 18:06:44 +0000 (18:06 +0000)
commitb619dd5d5b69ba9f4571a96e1a96d09d8aed03a7
tree79411ae481a896f857d5a454961479a75289eac9
parent2494dfcf1795a9bd28030d04cf2fb15e5c3b0f33
X86: Shrink certain forms of movsx.

In particular:
movsbw %al, %ax   --> cbtw
movswl %ax, %eax  --> cwtl
movslq %eax, %rax --> cltq

According to Intel's manual those have the same performance characteristics but
come with a smaller encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186174 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86MCInstLower.cpp
test/CodeGen/X86/fast-isel-ret-ext.ll
test/CodeGen/X86/mcinst-lowering.ll
test/CodeGen/X86/shl_elim.ll
test/CodeGen/X86/widen_conv-2.ll