This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] make canonicalize_condition keep its promise
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, ebotcazou at adacore dot com, richard dot sandiford at linaro dot org, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Wed, 15 Nov 2017 11:41:39 -0600
- Subject: Re: [PATCH] make canonicalize_condition keep its promise
- Authentication-results: sourceware.org; auth=none
- References: <1510760419.6005.3.camel@linux.vnet.ibm.com>
On 11/15/17 9:40 AM, Aaron Sawdey wrote:
> Index: gcc/rtlanal.c
> ===================================================================
> --- gcc/rtlanal.c (revision 254553)
> +++ gcc/rtlanal.c (working copy)
> @@ -5623,7 +5623,11 @@
> if (CC0_P (op0))
> return 0;
>
> - return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
> + /* We promised to return a comparison. */
> + rtx ret = gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
> + if (COMPARISON_P (ret))
> + return ret;
> + return 0;
I have no input on whether this approach is correct or not, but...
I know the return above this returns 0 as do other locations in
the file, but new code should return NULL_RTX.
Peter