Expand more when we have a nice 'tzcnt' instruction, to avoid generating
authorChandler Carruth <chandlerc@gmail.com>
Sat, 24 Dec 2011 11:11:38 +0000 (11:11 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 24 Dec 2011 11:11:38 +0000 (11:11 +0000)
commitd873a4b89b365f1e58e808109cd77034517f095d
tree451529a10fe7ee2c369b9f7cf83c6a64e76f24ab
parent131f7d35442416943309af1d13bf4462467181a1
Expand more when we have a nice 'tzcnt' instruction, to avoid generating
'bsf' instructions here.

This one is actually debatable to my eyes. It's not clear that any chip
implementing 'tzcnt' would have a slow 'bsf' for any reason, and unless
EFLAGS or a zero input matters, 'tzcnt' is just a longer encoding.
Still, this restores the old behavior with 'tzcnt' enabled for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147246 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/bmi.ll