This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix expand_cond_expr_using_cmove (PR middle-end/56548)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Steve Ellcey <sellcey at mips dot com>, Andrew Pinski <andrew dot pinski at caviumnetworks dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 06 Mar 2013 09:13:56 -0800
- Subject: Re: [PATCH] Fix expand_cond_expr_using_cmove (PR middle-end/56548)
- References: <20130306154732.GU12913@tucnak.redhat.com>
On 03/06/2013 07:47 AM, Jakub Jelinek wrote:
> The http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193539
> change broke the following testcase on i386. The problem is
> that it can return the result in wider mode than callers expect,
> causing either ICEs or other issues later on.
> It is fine to perform the cmove in promoted mode, but we should convert
> it to the right mode at the end in order not to confuse callers.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 2013-03-06 Jakub Jelinek <email@example.com>
> PR middle-end/56548
> * expr.c (expand_cond_expr_using_cmove): When expanding cmove in
> promoted mode, convert the result back to the original mode.
> * gcc.dg/pr56548.c: New test.