[InstCombine] Remove the zextOrTrunc from ShrinkDemandedConstant.
authorCraig Topper <craig.topper@gmail.com>
Thu, 20 Apr 2017 23:58:27 +0000 (23:58 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 20 Apr 2017 23:58:27 +0000 (23:58 +0000)
commit358cd9ae3a9b6f99054ea43af54ec08a39c28265
treeee2349ee061e0d9122e3e45ccb8e4b68ef44568e
parent2500d1e35d061fa99de1f79781088599c0c2e35f
[InstCombine] Remove the zextOrTrunc from ShrinkDemandedConstant.

The demanded mask and the constant should always be the same width for all callers today.

Also stop copying the demanded mask as its passed in. We should avoid allocating memory unless we are going to do something. The final AND to create the new constant will take care of it.

llvm-svn: 300927
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp