forked from OSchip/llvm-project
parent
596a3bd9ec
commit
7521e1b880
|
@ -2176,6 +2176,7 @@ Instruction *InstCombiner::visitSwitchInst(SwitchInst &SI) {
|
||||||
unsigned LeadingKnownOnes = KnownOne.countLeadingOnes();
|
unsigned LeadingKnownOnes = KnownOne.countLeadingOnes();
|
||||||
|
|
||||||
// Compute the number of leading bits we can ignore.
|
// Compute the number of leading bits we can ignore.
|
||||||
|
// TODO: A better way to determine this would use ComputeNumSignBits().
|
||||||
for (auto &C : SI.cases()) {
|
for (auto &C : SI.cases()) {
|
||||||
LeadingKnownZeros = std::min(
|
LeadingKnownZeros = std::min(
|
||||||
LeadingKnownZeros, C.getCaseValue()->getValue().countLeadingZeros());
|
LeadingKnownZeros, C.getCaseValue()->getValue().countLeadingZeros());
|
||||||
|
|
Loading…
Reference in New Issue