[X86] Teach X86DAGToDAGISel::shrinkAndImmediate to preserve upper 32 zeroes of a...
authorCraig Topper <craig.topper@intel.com>
Mon, 5 Feb 2018 16:54:07 +0000 (16:54 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 5 Feb 2018 16:54:07 +0000 (16:54 +0000)
commit57e06431600f60df5831bf3d8315fedac360ca22
tree2d190b4f1d3767104d4ee5258dff7e960267f297
parent22db17cf4334b028fe13e37ed7957eff2ae01ea9
[X86] Teach X86DAGToDAGISel::shrinkAndImmediate to preserve upper 32 zeroes of a 64 bit mask.

If the upper 32 bits of a 64 bit mask are all zeros, we have special isel patterns to use a 32-bit and instead of a 64-bit and by relying on the impliciting zeroing of 32 bit ops.

This patch teachs shrinkAndImmediate not to break that optimization.

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

llvm-svn: 324249
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/test/CodeGen/X86/and-encoding.ll
llvm/test/CodeGen/X86/shift-pair.ll