* Help with expanding compare
@ 2010-05-25 12:33 Revital1 Eres
2010-05-25 13:05 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Revital1 Eres @ 2010-05-25 12:33 UTC (permalink / raw)
To: gcc; +Cc: bonzini
Hello,
I am using current mainline to compile a testcase which contains a loop.
The target I'm working on supports cmpsi pattern.
While expanding the loop condition I get that do_compare_rtx_and_jump ()
and
do_jump_by_parts_greater_rtx () call each other repeatedly.
The test I'm compiling passes OK when using GCC 4.4. Looking into the
difference between the two versions that might caused this problem;
I see that in GCC4.4 can_compare_p () asks if the target supports
cmp_optab. while GCC4.6 does not ask for this opcode and thus IIUC causes
the later call to do_jump_by_parts_greater_rtx ().
I appreciate any help with this problem.
Thanks,
Revital
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help with expanding compare
2010-05-25 12:33 Help with expanding compare Revital1 Eres
@ 2010-05-25 13:05 ` Paolo Bonzini
2010-05-25 14:20 ` Revital1 Eres
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2010-05-25 13:05 UTC (permalink / raw)
To: Revital1 Eres; +Cc: gcc
On 05/25/2010 12:13 PM, Revital1 Eres wrote:
>
> Hello,
>
> I am using current mainline to compile a testcase which contains a loop.
> The target I'm working on supports cmpsi pattern.
>
> While expanding the loop condition I get that do_compare_rtx_and_jump ()
> and
> do_jump_by_parts_greater_rtx () call each other repeatedly.
>
> The test I'm compiling passes OK when using GCC 4.4. Looking into the
> difference between the two versions that might caused this problem;
> I see that in GCC4.4 can_compare_p () asks if the target supports
> cmp_optab. while GCC4.6 does not ask for this opcode and thus IIUC causes
> the later call to do_jump_by_parts_greater_rtx ().
Have you converted cmpsi to cbranchsi4?
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help with expanding compare
2010-05-25 13:05 ` Paolo Bonzini
@ 2010-05-25 14:20 ` Revital1 Eres
2010-05-25 14:23 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Revital1 Eres @ 2010-05-25 14:20 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: gcc
Hello,
Just did so... :-)
and it indeed solves this.
Thanks,
Revital
From: Paolo Bonzini <bonzini@gnu.org>
To: Revital1 Eres/Haifa/IBM@IBMIL
Cc: gcc@gcc.gnu.org
Date: 25/05/2010 03:57 PM
Subject: Re: Help with expanding compare
Sent by: Paolo Bonzini <paolo.bonzini@gmail.com>
On 05/25/2010 12:13 PM, Revital1 Eres wrote:
>
> Hello,
>
> I am using current mainline to compile a testcase which contains a loop.
> The target I'm working on supports cmpsi pattern.
>
> While expanding the loop condition I get that do_compare_rtx_and_jump ()
> and
> do_jump_by_parts_greater_rtx () call each other repeatedly.
>
> The test I'm compiling passes OK when using GCC 4.4. Looking into the
> difference between the two versions that might caused this problem;
> I see that in GCC4.4 can_compare_p () asks if the target supports
> cmp_optab. while GCC4.6 does not ask for this opcode and thus IIUC causes
> the later call to do_jump_by_parts_greater_rtx ().
Have you converted cmpsi to cbranchsi4?
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help with expanding compare
2010-05-25 14:20 ` Revital1 Eres
@ 2010-05-25 14:23 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2010-05-25 14:23 UTC (permalink / raw)
To: Revital1 Eres; +Cc: gcc
On 05/25/2010 03:01 PM, Revital1 Eres wrote:
> Hello,
>
> Just did so... :-)
> and it indeed solves this.
Remember to do the same for cstore.
Most of the time it will remove more code from your target than it adds.
I think that it did so for basically all targets in GCC 4.5, sometimes
cutting up to 1000 lines for no change in generated code. The only
exception was spu IIRC, which gained maybe 30 lines.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-25 13:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25 12:33 Help with expanding compare Revital1 Eres
2010-05-25 13:05 ` Paolo Bonzini
2010-05-25 14:20 ` Revital1 Eres
2010-05-25 14:23 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).