[KnownBits] Add fast-path for shl with unknown shift amount (NFC)
We currently don't call into KnownBits::shl() from ValueTracking if the shift amount is unknown. If we do try to do so, we get significant compile-time regressions, because evaluating all 64 shift amounts if quite expensive, and mostly pointless in this case. Add a fast-path for the case where the shift amount is the full [0, BitWidth-1] range. This primarily requires a more accurate estimate of the max shift amount, to avoid taking the fast-path in too many cases. Differential Revision: https://reviews.llvm.org/D151540
Loading
Please sign in to comment