HomePhabricator

[ValueTracking] Support funnel shifts in computeKnownBits()

Authored by nikic on Dec 2 2018, 6:14 AM.

Description

[ValueTracking] Support funnel shifts in computeKnownBits()

If the shift amount is known, we can determine the known bits of the
output based on the known bits of two inputs.

This is essentially the same functionality as implemented in D54869,
but for ValueTracking rather than InstCombine SimplifyDemandedBits.

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

llvm-svn: 348091

Details