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] Bug in simplify_if_then_else


Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de> writes:

> Hello,
> 
> on Jun 05, 2003, Jan Hubicka committed a patch to perform this
> optimization:
>         * combine.c (simplify_if_then_else): (IF_THEN_ELSE (NE REG 0) (0) (8))
>         is REG for nonzero_bits (REG) == 8.  
> 
> Unfortunately, this is invalid if the mode of the IF_THEN_ELSE
> is different from the mode of REG; this occurs in the test case
> attached below on s390-ibm-linux.
> 
> The following patch simply refuses to do the optimization if
> the modes do not match (it might be possible to improve upon
> this by using subregs, but for now this patch fixes the bug
> without introducing new risks ...).
> 
> Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux
> on both 3.4 and CVS head.
> 
> OK for 3.4 and head?

This is OK.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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