[X86] Don't accidentally select shll $1, %eax when shrinking an immediate.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 1 Apr 2015 19:01:09 +0000 (19:01 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 1 Apr 2015 19:01:09 +0000 (19:01 +0000)
commita066ed09db3772da6cffd26c14e5042ec9225eea
treecde5353d19873b3365a68eb40d3e3b67592cd2f7
parent5436372079c2ab1614e564bcec74383da62701a2
[X86] Don't accidentally select shll $1, %eax when shrinking an immediate.

addl has higher throughput and this was needlessly picking a suboptimal
encoding causing PR23098.

I wish there was a way of doing this without further duplicating tbl-
generated patterns, but so far I haven't found one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233832 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
test/CodeGen/X86/narrow-shl-cst.ll