This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix expand_cond_expr_using_cmove (PR middle-end/56548)


On 03/06/2013 07:47 AM, Jakub Jelinek wrote:
> Hi!
> 
> 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  <jakub@redhat.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.

Ok.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]