From: Chris Lattner Date: Sun, 9 Dec 2007 17:56:34 +0000 (+0000) Subject: Duncan points out that the subtraction is unneeded since hte code X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=46a6e79e602b23ea3478027d5bdd1f904aea7924;p=oota-llvm.git Duncan points out that the subtraction is unneeded since hte code knows the vector is not pow2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44740 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp index c77bf12d9a3..685ae9e76b8 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp @@ -27,7 +27,7 @@ static void GetSplitDestVTs(MVT::ValueType InVT, NumElements >>= 1; Lo = Hi = MVT::getVectorType(NewEltVT, NumElements); } else { // Non-power-of-two vectors. - unsigned NewNumElts_Lo = 1 << Log2_32(NumElements-1); + unsigned NewNumElts_Lo = 1 << Log2_32(NumElements); unsigned NewNumElts_Hi = NumElements - NewNumElts_Lo; Lo = MVT::getVectorType(NewEltVT, NewNumElts_Lo); Hi = MVT::getVectorType(NewEltVT, NewNumElts_Hi);