OSDN Git Service

[X86] Teach X86TargetLowering::targetShrinkDemandedConstant to set non-demanded bits...
authorCraig Topper <craig.topper@intel.com>
Wed, 14 Mar 2018 16:55:15 +0000 (16:55 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 14 Mar 2018 16:55:15 +0000 (16:55 +0000)
commit3a48b7c274c3924e191efb8e3a30dc24dc699ecb
tree9f7167a3f2d954e31666ab6e544d7d8e02c27dc5
parentc2f88d9b7efa4227725d862217d2137672903f82
[X86] Teach X86TargetLowering::targetShrinkDemandedConstant to set non-demanded bits if it helps created an and mask that can be matched as a zero extend.

I had to modify the bswap recognition to allow unshrunk masks to make this work.

Fixes PR36689.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pr12360.ll
test/CodeGen/X86/pr32284.ll
test/CodeGen/X86/zext-demanded.ll