This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] [PATCH] fix PR 13066, fold being stupid
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 29 Feb 2004 11:46:57 -0500
- Subject: Re: [tree-ssa] [PATCH] fix PR 13066, fold being stupid
- Organization: Red Hat Canada
- References: <6059B8DF-6A5C-11D8-888A-000393A6D2F2@physics.uc.edu>
On Sat, 2004-02-28 at 21:09, Andrew Pinski wrote:
> I prefer the not folding patch as it is a memory savings one unless
> someone can prove me wrong.
>
Funny. I was just toying around with this on Friday. I had initially
done the folding version and was going to submit it for review.
I tested your non-folding patch and the problem I see is that it doesn't
stop us from generating "bad" GIMPLE code:
int f()
{
...
int T.1;
...
T.1 = a.0 == 0;
...
if (T.1 != iftmp.2)
...
}
T.1 ought to be of type 'bool', shouldn't it?
I agree that with the call to fold_convert we generate more GIMPLE code
initially, but it looks more correct to me:
int f()
{
bool iftmp.0;
bool T.6;
bool T.7;
...
if (a.1 == 0)
iftmp.0 = 1; <= Nit. pretty printer ought to render 'true';
else
iftmp.0 = 0;
...
T.6 = (bool)iftmp.2;
T.7 = iftmp.0 ^ T.6;
if (T.7)
...
}
So, I would go with the call to fold_convert, but I'll let our FE folks
decide.
Diego.