From 46a6e79e602b23ea3478027d5bdd1f904aea7924 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 9 Dec 2007 17:56:34 +0000 Subject: 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 --- lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp index c77bf12..685ae9e 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); -- cgit v1.1