Gemv microoptimization
diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h
index 475ac85..bd2bc9b2 100644
--- a/Eigen/src/Core/products/GeneralMatrixVector.h
+++ b/Eigen/src/Core/products/GeneralMatrixVector.h
@@ -362,9 +362,9 @@
          HasQuarter = (int)ResPacketSizeQuarter < (int)ResPacketSizeHalf
   };
 
-  const Index fullColBlockEnd = LhsPacketSize * (cols / LhsPacketSize);
-  const Index halfColBlockEnd = LhsPacketSizeHalf * (cols / LhsPacketSizeHalf);
-  const Index quarterColBlockEnd = LhsPacketSizeQuarter * (cols / LhsPacketSizeQuarter);
+  const Index fullColBlockEnd = cols & (-LhsPacketSize);
+  const Index halfColBlockEnd = cols & (-LhsPacketSizeHalf);
+  const Index quarterColBlockEnd = cols & (-LhsPacketSizeQuarter);
 
   Index i=0;
   for(; i<n8; i+=8)