ifcvt.c improvements for a new port

Bernd Schmidt bernds@redhat.com
Tue Jul 30 15:17:00 GMT 2002


On Wed, 24 Jul 2002, Bernd Schmidt wrote:
> On Mon, 22 Jul 2002, Richard Earnshaw wrote:
> 
> > Now the ifdef'ed code mentioned above will cause a failure if either 
> > true_expr or false_expr are null after running the test, but we don't fail 
> > if the macro isn't defined, so we can fall through into the subsequent 
> > code with flase_expr == NULL.  This causes an abort in the call to 
> > cond_exec_process_insns since we pass a NULL pointer as the TEST parameter.
> 
> Does this fix it for you?

Since you didn't reply I'm checking this in now; please let me know if you
still have problems after this.
> 
> Index: ifcvt.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/ifcvt.c,v
> retrieving revision 1.98
> diff -c -p -r1.98 ifcvt.c
> *** ifcvt.c	21 Jul 2002 14:32:24 -0000	1.98
> --- ifcvt.c	24 Jul 2002 12:07:59 -0000
> *************** cond_exec_process_if_block (ce_info, do_
> *** 426,442 ****
>   #ifdef IFCVT_MODIFY_TESTS
>     /* If the machine description needs to modify the tests, such as setting a
>        conditional execution register from a comparison, it can do so here.  */
> -   IFCVT_MODIFY_TESTS (true_expr, false_expr, test_bb, then_bb, else_bb,
> - 		      join_bb);
> - 
> -   /* See if the conversion failed */
> -   if (!true_expr || !false_expr)
> -     goto fail;
> - #endif
> - 
> - #ifdef IFCVT_MODIFY_TESTS
> -   /* If the machine description needs to modify the tests, such as setting a
> -      conditional execution register from a comparison, it can do so here.  */
>     IFCVT_MODIFY_TESTS (ce_info, true_expr, false_expr);
>   
>     /* See if the conversion failed */
> --- 426,431 ----
> *************** cond_exec_process_if_block (ce_info, do_
> *** 459,464 ****
> --- 448,456 ----
>       {
>         basic_block bb = test_bb;
>         basic_block last_test_bb = ce_info->last_test_bb;
> + 
> +       if (! false_expr)
> + 	goto fail;
>   
>         do
>   	{
> 
> 



More information about the Gcc-patches mailing list