This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/30688] Branch registers loaded too late on ia64



------- Comment #1 from ak at muc dot de  2007-02-03 11:22 -------
Here's a simple test case:

void f(int k, int (*fptr)(int i))
{ 
        int i;

        /* Do something useless */
        for (i = 0; i < 5; i++) 
                k *= 10;

        fptr(k); 
} 


compiled with  4.3.0 20070203 gives


...
        ;;
        .mmi
        nop 0
        mov r1 = r36
        mov b0 = r34
        .mib
        nop 0
        mov ar.pfs = r35
        br.ret.sptk.many b0


Note b0 is only loaded directly in front of the branch, even though it could
have been loaded much earlier in front of the loop.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30688


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