This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for PR21969 (large vector causes ICE)


On Mon, Jun 27, 2005 at 02:14:15PM -0700, Steve Ellcey wrote:
> ! /* Set precision to n when we have 2^n sub-parts of the vector.  */
> ! #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
> !   (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 ((X) & -(X)))

You don't need the X&-X.  This value better be a power of 2 or else.
You could add a gcc_assert if you like.

Otherwise ok.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]