[X86] Improve detection of unneeded shift amount masking to also handle the case...
authorCraig Topper <craig.topper@intel.com>
Mon, 25 Feb 2019 19:42:47 +0000 (19:42 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 25 Feb 2019 19:42:47 +0000 (19:42 +0000)
commit316c58e8f1771a145f797c0bd266565cbb541f96
tree8c93527c35b39d6e60a421677242671fb3b5a2cd
parent4a1e59a6e0835ab4d03ab7ce317a08df7ec6cb22
[X86] Improve detection of unneeded shift amount masking to also handle the case that the LHS has known zeroes in it

If the LHS has known zeros, the RHS immediate will have had bits removed. So call computeKnownBits to get the known zeroes so we can handle this case.

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

llvm-svn: 354811
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/test/CodeGen/X86/btc_bts_btr.ll
llvm/test/CodeGen/X86/rotate4.ll