This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19507] missed tree-optimization
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2005 20:10:20 -0000
- Subject: [Bug tree-optimization/19507] missed tree-optimization
- References: <20050118161903.19507.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-18 20:10 -------
Subject: Re: missed tree-optimization
pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-18 20:06 -------
> (In reply to comment #1)
>
>>A C testcase with the missing jump threading(?):
>>
>>void bar(void);
>>
>>void foo(const _Bool *flag)
>>{
>> if (*flag)
>> bar();
>> if (*flag)
>> bar();
>>}
>
>
> No this one cannot be optimizated because we can change what is in flag in bar();
I meant this should be transformed to
if (!*flag)
return;
bar();
if (*flag)
bar();
this is done at RTL level, but not at tree level. I should file a
separate bug for this one, really.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19507