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/28970] [4.1 regression] wrong code for simple loop test case



------- Comment #9 from ebotcazou at gcc dot gnu dot org  2006-10-30 16:01 -------
> Bug in biv selection, so strength reduction messes up:
> 
> Loop from 45 to 46: 12 real insns.
> Biv 60: insn 19 const (reg 59 [ pretmp.26 ])
> Biv 60: insn 22 const (1)
> Biv 60: verified
> Biv 60: initialized at insn 13: initial value (0)
> 
> 60 is not a Biv:

Yeah, the limitations of loop.c are blatantly exposed by the new dialect
generated by the RTL expanders in 4.x because of the 100 tree-opt passes.

It turns out that 3.x finds the same BIVs:

Biv 61: insn 22 const (1)
Biv 61: insn 28 const (reg 65)
Biv 61: verified
Biv 61: initialized at insn 12: initial value (0)

but the non-constant increment comes after the constant one, which is enough
to prevent the GIV from being eliminated...


-- 


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


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