[InstCombine] clean up; NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 29 Apr 2016 20:54:56 +0000 (20:54 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 29 Apr 2016 20:54:56 +0000 (20:54 +0000)
llvm-svn: 268099

llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

index 27e1f24..31eb6ae 100644 (file)
@@ -898,7 +898,7 @@ Value *InstCombiner::SimplifyShrShlDemandedBits(Instruction *Shr,
 Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
                                                 APInt &UndefElts,
                                                 unsigned Depth) {
-  unsigned VWidth = cast<VectorType>(V->getType())->getNumElements();
+  unsigned VWidth = V->getType()->getVectorNumElements();
   APInt EltMask(APInt::getAllOnesValue(VWidth));
   assert((DemandedElts & ~EltMask) == 0 && "Invalid DemandedElts!");