Skip to content

Commit be31853

Browse files
committed
refactor
1 parent a5445e7 commit be31853

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3925,17 +3925,16 @@ static unsigned ComputeNumSignBitsImpl(const Value *V,
39253925
case Instruction::BitCast: {
39263926
Value *Src = U->getOperand(0);
39273927
Type *SrcTy = Src->getType();
3928-
Type *SrcScalarTy = SrcTy->getScalarType();
39293928

3930-
if (!SrcScalarTy->isIntegerTy())
3929+
if (!SrcTy->isIntOrIntVectorTy())
39313930
break;
39323931

39333932
unsigned SrcBits = SrcTy->getScalarSizeInBits();
39343933

39353934
if ((SrcBits % TyBits) != 0)
39363935
break;
39373936

3938-
if (auto *DstVTy = dyn_cast<FixedVectorType>(Ty)) {
3937+
if (isa<FixedVectorType>(Ty)) {
39393938
if (auto *SrcVTy = dyn_cast<FixedVectorType>(SrcTy)) {
39403939
APInt SrcDemandedElts =
39413940
APInt::getSplat(SrcVTy->getNumElements(), APInt(1, 1));

0 commit comments

Comments
 (0)