This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix bitmap_last_set_bit
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 6 Sep 2012 11:21:25 +0200
- Subject: Re: [patch] Fix bitmap_last_set_bit
- References: <CABu31nP16fJY4fT0cu9D1oRMT=_WfVRkRwXaNQJ7XQGD4KGWvQ@mail.gmail.com>
On Wed, Sep 5, 2012 at 10:40 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hi,
>
> bitmap.c:bitmap_last_set_bit() is not used by any code in the current
> GCC trunk, but I'm using it and I noticed it returns an incorrect
> result. This patch rewrites most of the function to return the correct
> result.
>
> Not sure how to test this other than to say that my code, that uses
> this function, works with the patch and breaks without it. I've also
> unleashed bitmap_last_set_bit (and bitmap_first_set_bit) on a large
> number of randomly generated bitmaps and rather expensive verification
> code that doesn't accept the results of the pre-patch
> bitmap_last_set_bit and is happy with my new implementation.
>
> OK for trunk?
Ok.
Thanks,
Richard.
> Ciao!
> Steven
>
> * bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit.