public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13300] New: Variable incorrectly identified as a biv
@ 2003-12-04 10:12 rsandifo at gcc dot gnu dot org
  2003-12-04 10:13 ` [Bug optimization/13300] " rsandifo at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2003-12-04 10:12 UTC (permalink / raw)
  To: gcc-bugs

The attached test case fails on alpha-linux-gnu at -O2.  The loop
optimisers are assuming that the sequence:

    (set (reg:DI temp) (plus:DI (reg:DI i) (const_int 1)))
    (set (reg:DI i) (sign_extend:DI (subreg:SI (reg:DI temp) 0)))

has undefined behaviour on overflow and that it can therefore be
treated like:

    (set (reg:DI i) (plus:DI (reg:DI i) (const_int 1)))

for the purposes of biv detection.  Thanks to geoffk for the example.

I think the problem was introduced by:

Sat Feb 23 08:42:47 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * expr.c (store_expr): When converting expression to promoted
        equivalent type, allow using SUBREG_REG of TARGET as the target
        of the expansion of EXP.
        * loop.c (basic_induction_var, case SUBREG): Always look inside.
        * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl.
        (alpha_emit_set_const): Handle SImode when can't make new pseudos.
        (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos.
        * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing.

Posted here: http://gcc.gnu.org/ml/gcc-patches/2002-02/msg01562.html

although as Richard says, the old code wouldn't detect promoted
bivs at all since the increment sequences don't look the way
the comments say they do.

-- 
           Summary: Variable incorrectly identified as a biv
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rsandifo at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: alpha-linux-gnu


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-03-30  6:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04 10:12 [Bug optimization/13300] New: Variable incorrectly identified as a biv rsandifo at gcc dot gnu dot org
2003-12-04 10:13 ` [Bug optimization/13300] " rsandifo at gcc dot gnu dot org
2003-12-04 10:48 ` pinskia at gcc dot gnu dot org
2003-12-04 15:24 ` bangerth at dealii dot org
2004-02-03 23:23 ` pinskia at gcc dot gnu dot org
2004-08-10  1:05 ` [Bug rtl-optimization/13300] " pinskia at gcc dot gnu dot org
2004-11-28 16:00 ` [Bug rtl-optimization/13300] [3.3, 3.4, 4.0 regression] " falk at debian dot org
2004-11-28 16:02 ` [Bug rtl-optimization/13300] [3.3/3.4/4.0 " pinskia at gcc dot gnu dot org
2005-01-28 23:34 ` echristo at redhat dot com
2005-01-29  8:30 ` rsandifo at gcc dot gnu dot org
2005-02-12 23:29 ` pinskia at gcc dot gnu dot org
2005-03-24 18:02 ` [Bug rtl-optimization/13300] [3.3/3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-03-30  6:53 ` [Bug rtl-optimization/13300] [3.3/3.4 " rsandifo at gcc dot gnu dot org

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).