This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve PR91257, specialize bitmap_ior_and_compl_into
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jul 2019 12:41:40 +0200
- Subject: Re: [PATCH] Improve PR91257, specialize bitmap_ior_and_compl_into
- References: <alpine.LSU.2.20.1907301217160.19626@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 30, 2019 at 12:20:00PM +0200, Richard Biener wrote:
> + if (compl_p)
> + for (ix = 0; ix < BITMAP_ELEMENT_WORDS; ix++)
> + {
> + and_elt.bits[ix] = b_elt->bits[ix] & ~c_elt->bits[ix];
> + overall |= and_elt.bits[ix];
> + }
> + else
> + for (ix = 0; ix < BITMAP_ELEMENT_WORDS; ix++)
> + {
> + and_elt.bits[ix] = b_elt->bits[ix] & c_elt->bits[ix];
> + overall |= and_elt.bits[ix];
> + }
Might be more readable by moving the if (compl_p) into the loop,
just guarding the single statement that is different or even use a
BITMAP_WORD temporary to load c_elt->bits[ix] into it, then conditionally
complement and then use unconditionally in &.
Jakub