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

[lno] Error with -funroll-loops and tramp3d-v3 testcase


Hi!

I took the oportunity to give lno another whirl and got stuck with the
first experiment (i.e. -O2 -funroll-loops, just as I do for head and 3.4):

g++ (GCC) 3.5-tree-ssa-lno 20040615 (merged 20040612)

rguenth@alwazn tmp $ ~/ix86/gccssa-lno/bin/g++ -O2 -funroll-loops -o
 tramp3d-v3.lno.lo tramp3d-v3.cpp -static -Dleafify=fooblah
tramp3d-v3.cpp:15627: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:15636: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:27426: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:31114: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:31390: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:40288: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:40296: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:41213: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp:41399: warning: `fooblah' attribute directive ignored
tramp3d-v3.cpp: In member function `void
RefBlockController<T>::reallocateStorage(size_t, bool) [with T = Vector<3,
double, Full>]':
tramp3d-v3.cpp:10547: error: unable to find a register to spill in class
`AREG'
tramp3d-v3.cpp:10547: error: this is the insn:
(insn:HI 38 37 39 2 (parallel [
            (set (reg:SI 1 dx [93])
                (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg:SI
3 bx [91]))
                            (zero_extend:DI (reg:SI 1 dx [94])))
                        (const_int 32 [0x20]))))
            (clobber (scratch:SI))
            (clobber (reg:CC 17 flags))
        ]) 182 {*umulsi3_highpart_insn} (insn_list 37 (nil))
    (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_UNUSED (scratch:SI)
            (expr_list:REG_DEAD (reg:SI 3 bx [91])
                (expr_list:REG_DEAD (reg:SI 1 dx [94])
                    (expr_list:REG_UNUSED (reg:CC 17 flags)
                        (expr_list:REG_UNUSED (scratch:SI)
                            (expr_list:REG_EQUAL (truncate:SI (lshiftrt:DI
(mult:DI (zero_extend:DI (reg:SI 3 bx [91]))
                                            (const_double -1431655765
[0xaaaaaaab] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0]))
                                        (const_int 32 [0x20])))
                                (nil)))))))))
tramp3d-v3.cpp:10547: confused by earlier errors, bailing out


Using -fpeel-loops instead of -funroll-loops makes the failure go away (I
use -funroll-loops mainly to have loops like

  for (int i=0; i<3; ++i)
    a[i] = b[i];

unrolled.  GCC should really do this at -O2.  It's quite common to have
in code templated on dimension (ranging typically from 0 to 4).)

You can fetch tramp3d-v3.cpp from
http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/tramp3d-v3.cpp.gz

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


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