public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/54294] New: [4.8 Regression]: [alpha] Bootstrap comparison failure due to fwprop handling of debug insns
@ 2012-08-16 23:20 ubizjak at gmail dot com
  2012-08-16 23:23 ` [Bug rtl-optimization/54294] " ubizjak at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2012-08-16 23:20 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54294
           Summary: [4.8 Regression]: [alpha] Bootstrap comparison failure
                    due to fwprop handling of debug insns
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ubizjak@gmail.com
            Target: alphaev68-unknown-linux-gnu


Alpha bootstrap is currently broken due to stage2/3 comparison failure.

The problem is in handling of debug instructions in fwprop1 pass.

Please compare following non-debug compilation, where we start from
_.ii.156r.cse1 pass:

(note 3642 3637 3643 423 [bb 423] NOTE_INSN_BASIC_BLOCK)
(insn 3643 3642 3644 423 (set (reg:DI 1212 [ ei ])
        (sign_extend:DI (subreg:SI (reg:DI 1212 [ ei ]) 0))) 2 {*extendsidi2_1}
     (nil))
(insn 3644 3643 3728 423 (set (reg:DI 1263 [ ivtmp.371 ])
        (sign_extend:DI (subreg:SI (reg:DI 1212 [ ei ]) 0))) 2 {*extendsidi2_1}
     (nil))

And in _.ii.157.fwprop1, operands got propagated to:

(note 3642 3637 3643 423 [bb 423] NOTE_INSN_BASIC_BLOCK)
(insn 3643 3642 3644 423 (set (reg:DI 1212 [ ei ])
        (sign_extend:DI (reg:SI 2385))) 2 {*extendsidi2_1}
     (nil))
(insn 3644 3643 3728 423 (set (reg:DI 1263 [ ivtmp.371 ])
        (sign_extend:DI (reg:SI 2385))) 2 {*extendsidi2_1}
     (nil))


The difference in debug compilation can be shown starting again from
_.ii.156r.cse1 pass:

(note 4153 4148 4154 423 [bb 423] NOTE_INSN_BASIC_BLOCK)
(insn 4154 4153 4155 423 (set (reg:DI 1212 [ ei ])
        (sign_extend:DI (subreg:SI (reg:DI 1212 [ ei ]) 0))) 2 {*extendsidi2_1}
     (nil))
(debug_insn 4155 4154 4157 423 (var_location:SI ei (subreg:SI (reg:DI 1212 [ ei
]) 0)) -1
     (nil))
(debug_insn 4157 4155 4158 423 (var_location:BLK D#9 (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/cprop.c:1519 -1
     (nil))
(debug_insn 4158 4157 4159 423 (var_location:DI p (debug_implicit_ptr:DI e))
../../gcc-svn/trunk/gcc/cprop.c:1519 -1
     (nil))
(debug_insn 4159 4158 4160 423 (var_location:SI ei (subreg:SI (reg:DI 1212 [ ei
]) 0)) -1
     (nil))
(debug_insn 4160 4159 4162 423 (var_location:DI ei$8 (debug_expr:DI D#34)) -1
     (nil))
(debug_insn 4162 4160 4163 423 (var_location:BLK D#7 (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/basic-block.h:636 -1
     (nil))
(debug_insn 4163 4162 4164 423 (var_location:DI i$container (debug_expr:DI
D#34)) -1
     (nil))
(debug_insn 4164 4163 4165 423 (var_location:DI vec_ (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/basic-block.h:586 -1
     (nil))
(insn 4165 4164 4249 423 (set (reg:DI 1263 [ ivtmp.371 ])
        (sign_extend:DI (subreg:SI (reg:DI 1212 [ ei ]) 0))) 2 {*extendsidi2_1}
     (nil))

where _.ii.157.fwprop1 pass propagates only operands before the clobber,
resulting in:

(note 4153 4148 4154 423 [bb 423] NOTE_INSN_BASIC_BLOCK)
(insn 4154 4153 4155 423 (set (reg:DI 1212 [ ei ])
        (sign_extend:DI (reg:SI 2385))) 2 {*extendsidi2_1}
     (nil))
(debug_insn 4155 4154 4157 423 (var_location:SI ei (reg:SI 2385)) -1
     (nil))
(debug_insn 4157 4155 4158 423 (var_location:BLK D#9 (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/cprop.c:1519 -1
     (nil))
(debug_insn 4158 4157 4159 423 (var_location:DI p (debug_implicit_ptr:DI e))
../../gcc-svn/trunk/gcc/cprop.c:1519 -1
     (nil))
(debug_insn 4159 4158 4160 423 (var_location:SI ei (subreg:SI (reg:DI 1212 [ ei
]) 0)) -1
     (nil))
(debug_insn 4160 4159 4162 423 (var_location:DI ei$8 (debug_expr:DI D#34)) -1
     (nil))
(debug_insn 4162 4160 4163 423 (var_location:BLK D#7 (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/basic-block.h:636 -1
     (nil))
(debug_insn 4163 4162 4164 423 (var_location:DI i$container (debug_expr:DI
D#34)) -1
     (nil))
(debug_insn 4164 4163 4165 423 (var_location:DI vec_ (clobber (const_int 0
[0]))) ../../gcc-svn/trunk/gcc/basic-block.h:586 -1
     (nil))
(insn 4165 4164 4249 423 (set (reg:DI 1263 [ ivtmp.371 ])
        (sign_extend:DI (subreg:SI (reg:DI 1212 [ ei ]) 0))) 2 {*extendsidi2_1}
     (nil))

This introduces real difference in (insn 4165) of the debug compilation vs
(insn 3644) of the non-debug compilation. Things go down from there, the final
difference is (non-debug):

(insn:TI 3643 2534 3644 (set (reg:DI 2 $2 [orig:1212 ei ] [1212])
        (sign_extend:DI (plus:SI (reg:SI 4 $4 [orig:1263 ivtmp.371 ] [1263])
                (const_int 1 [0x1])))) 4 {*addsi_se}
     (expr_list:REG_DEAD (reg:SI 4 $4 [orig:1263 ivtmp.371 ] [1263])
        (nil)))
(insn:TI 3644 3643 6425 (set (reg:DI 4 $4 [orig:1263 ivtmp.371 ] [1263])
        (reg:DI 2 $2 [orig:1212 ei ] [1212])) 236 {*movdi}
     (nil))

versus debug compilation:

(note 8075 2865 8076 (var_location i (debug_implicit_ptr:DI ei))
NOTE_INSN_VAR_LOCATION)
(note 8076 8075 4154 (var_location i$container (reg/v/f:DI 11 $11 [orig:754 bb
] [754])) NOTE_INSN_VAR_LOCATION)
(insn:TI 4154 8076 8077 (set (reg:DI 2 $2 [orig:1212 ei ] [1212])
        (sign_extend:DI (plus:SI (reg:SI 4 $4 [orig:1263 ivtmp.371 ] [1263])
                (const_int 1 [0x1])))) 4 {*addsi_se}
     (expr_list:REG_DEAD (reg:SI 4 $4 [orig:1263 ivtmp.371 ] [1263])
        (nil)))
(note 8077 4154 8078 (var_location p (debug_implicit_ptr:DI e))
NOTE_INSN_VAR_LOCATION)
(note 8078 8077 4165 (var_location i$container (reg/v/f:DI 11 $11 [orig:754 bb
] [754])) NOTE_INSN_VAR_LOCATION)
(insn:TI 4165 8078 6973 (set (reg:DI 4 $4 [orig:1263 ivtmp.371 ] [1263])
        (sign_extend:DI (reg:SI 2 $2 [orig:1212 ei ] [1212]))) 2
{*extendsidi2_1}
     (nil))

and finally:

+       .loc 1 1520 0
        ldq $2,8($2)
        ldl $2,48($2)
        and $2,64,$2
        bne $2,$L829
+$LVL612:
        addl $4,1,$2
-       mov $2,$4
+       addl $31,$2,$4
        br $31,$L421
+$LVL613:
 $L829:


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

end of thread, other threads:[~2012-08-20 18:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 23:20 [Bug rtl-optimization/54294] New: [4.8 Regression]: [alpha] Bootstrap comparison failure due to fwprop handling of debug insns ubizjak at gmail dot com
2012-08-16 23:23 ` [Bug rtl-optimization/54294] " ubizjak at gmail dot com
2012-08-16 23:25 ` ubizjak at gmail dot com
2012-08-17  8:10 ` ubizjak at gmail dot com
2012-08-17  8:39 ` jakub at gcc dot gnu.org
2012-08-17 10:06 ` jakub at gcc dot gnu.org
2012-08-17 10:29 ` jakub at gcc dot gnu.org
2012-08-17 11:15 ` ubizjak at gmail dot com
2012-08-17 14:26 ` ubizjak at gmail dot com
2012-08-17 19:50 ` ubizjak at gmail dot com
2012-08-20 18:57 ` jakub at gcc dot gnu.org
2012-08-20 18:58 ` jakub at gcc dot gnu.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).