This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR47271: only if-convert full writes.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Sebastian Pop <sebpop at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Mon, 24 Jan 2011 21:39:04 +0100
- Subject: Re: [PATCH] Fix PR47271: only if-convert full writes.
- References: <1295901084-4644-1-git-send-email-sebpop@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jan 24, 2011 at 02:31:24PM -0600, Sebastian Pop wrote:
> @@ -774,6 +788,14 @@ if_convertible_bb_p (struct loop *loop, basic_block bb, basic_block exit_bb)
> return false;
> }
>
> + if (EDGE_COUNT (bb->preds) > 2)
> + return false;
> +
The above 3 lines are redundant with the start of the function:
if (EDGE_COUNT (bb->preds) > 2
|| EDGE_COUNT (bb->succs) > 2)
return false;
> + if (EDGE_COUNT (bb->preds) == 2
> + && bb != loop->header
> + && !bb_postdominates_preds (bb))
> + return false;
> +
> return true;
> }
Jakub