]> granicus.if.org Git - llvm/commit
[X86] Add BLSI to isUseDefConvertible.
authorCraig Topper <craig.topper@intel.com>
Thu, 20 Jun 2019 17:52:53 +0000 (17:52 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 20 Jun 2019 17:52:53 +0000 (17:52 +0000)
commitd99a7ea8cd2b634d0dcb13c44d06c4bdd4436c4e
tree0cfe792973392e0237242625cd22b02c1ae0c12a
parent0e1f2dd70807df8671baf1393524d0bd00dd847a
[X86] Add BLSI to isUseDefConvertible.

Summary:
BLSI sets the C flag is the input is not zero. So if its followed
by a TEST of the input where only the Z flag is consumed, we can
replace it with the opposite check of the C flag.

We should be able to do the same for BLSMSK and BLSR, but the
naive test case for those is being optimized to a subo by
CodeGenPrepare.

Reviewers: spatel, RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63589

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