Index: llvm/lib/Analysis/ValueTracking.cpp =================================================================== --- llvm/lib/Analysis/ValueTracking.cpp +++ llvm/lib/Analysis/ValueTracking.cpp @@ -6046,14 +6046,12 @@ return LHSR.intersectWith(RHSR); } - unsigned BitWidth = V->getType()->getScalarSizeInBits(); CmpInst::Predicate Pred; const APInt *C; if (match(Condition, m_ICmp(Pred, m_Specific(V), m_APInt(C)))) - if (C->getBitWidth() == BitWidth) - return ConstantRange::makeExactICmpRegion(Pred, *C); + return ConstantRange::makeExactICmpRegion(Pred, *C); - return ConstantRange::getFull(BitWidth); + return ConstantRange::getFull(V->getType()->getScalarSizeInBits()); } static ConstantRange