[llvm] r268099 - [InstCombine] clean up; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 13:54:57 PDT 2016


Author: spatel
Date: Fri Apr 29 15:54:56 2016
New Revision: 268099

URL: http://llvm.org/viewvc/llvm-project?rev=268099&view=rev
Log:
[InstCombine] clean up; NFC

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp?rev=268099&r1=268098&r2=268099&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Fri Apr 29 15:54:56 2016
@@ -898,7 +898,7 @@ Value *InstCombiner::SimplifyShrShlDeman
 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!");
 




More information about the llvm-commits mailing list