[Bug c++/14455] New: Inner Altivec loop contains load/stores but not all registers being used

tjw at omnigroup dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 6 04:31:00 GMT 2004


Often in inner loops (no child functions called, big loop count), there will be several (many!) Altivec 
registers left unused.

The attached file demonstrates the problem, when built with tree-ssa with:

%PREFIX/bin/g++ -Winline -mdynamic-no-pic -fno-exceptions -O3 -maltivec -fstrict-aliasing 
-finline-functions -finline-limit=1000000000 -falign-loops=16 --param large-function-
growth=1000000 --param inline-unit-growth=1000 iterator_10.cpp -S -o /tmp/iterator_10.s

In my real world code, this is a big problem since I'm have code that does:

    - long computation for some answer
    - compute some address to ADD to the answer to (and the address is almost never in cache)
    - load from answer address
    - start on next loop
    - add answer and old answer and store

The problem is that the compiler totally blows the approach since it immediately stores the loaded 
old answer to the stack, causing a stall waiting for the load to complete (and thus preventing any 
asynchrony with the load and the computation in the next loop).

-- 
           Summary: Inner Altivec loop contains load/stores but not all
                    registers being used
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tjw at omnigroup dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


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



More information about the Gcc-bugs mailing list