------- Comment #15 from jakub at gcc dot gnu dot org  2008-10-24 14:38 -------
BTW, the unwind info says that rp is saved in r34 even for the .L7 and onwards
hunk.
Anyway, in the 196r.compgotos dump mov r34 = b0 insn is still before the
conditional jump to .L7, it is the scheduler that moves it after it. 
Explicitly
in the RTL b0 needs to be restored only in the common case branch, not in .L7,
not sure what exactly should tell the scheduler that register, into which
INCOMING_RETURN_ADDR_RTX has been saved, needs to be live there as well.

So I'd say this is a data flow bug (or target, if dataflow has a way how to
express this).

Looking at the *.dce dump, where bb2 has the mov r34 = b0 insn and bb3 is the
bb with several calls ending with noreturn _Jv_Throw, I see that r34 isn't
considered live in bb3:
( 0 )->[2]->( 3 4 )
;; bb 2 artificial_defs: { }
;; bb 2 artificial_uses: { u-1(12){ }}
;; lr  in        1 [r1] 12 [r12] 14 [r14] 15 [r15] 112 [r32] 113 [r33] 320 [b0]
;; lr  use       1 [r1] 12 [r12] 113 [r33] 320 [b0]
;; lr  def       12 [r12] 32 [r34] 33 [r35] 34 [r36] 262 [p6] 263 [p7]
;; lr  out       1 [r1] 12 [r12] 14 [r14] 15 [r15] 32 [r34] 33 [r35] 34 [r36]
112 [r32] 113 [r33]

( 2 )->[3]->( )
;; bb 3 artificial_defs: { }
;; bb 3 artificial_uses: { u-1(12){ }}
;; lr  in        1 [r1] 12 [r12] 34 [r36]
;; lr  use       1 [r1] 12 [r12] 34 [r36]
;; lr  def       many (snippet out), but 32 [r34] isn't mentioned
;; lr  out       12 [r12]

( 2 )->[4]->( 6 5 )
;; bb 4 artificial_defs: { }
;; bb 4 artificial_uses: { u-1(12){ }}
;; lr  in        1 [r1] 12 [r12] 14 [r14] 15 [r15] 32 [r34] 33 [r35] 34 [r36]
112 [r32] 113 [r33]
;; lr  use       12 [r12] 14 [r14] 15 [r15] 112 [r32] 113 [r33]
;; lr  def       8 [r8] 14 [r14] 262 [p6] 263 [p7]
;; lr  out       1 [r1] 8 [r8] 12 [r12] 32 [r34] 33 [r35] 34 [r36] 112 [r32]
113 [r33]

( 4 )->[5]->( 6 )
;; bb 5 artificial_defs: { }
;; bb 5 artificial_uses: { u-1(12){ }}
;; lr  in        1 [r1] 12 [r12] 32 [r34] 33 [r35] 34 [r36] 112 [r32] 113 [r33]
;; lr  use       1 [r1] 12 [r12] 34 [r36] 112 [r32] 113 [r33]
;; lr  def       many, 32 [r34] isn't mentioned
;; lr  out       1 [r1] 8 [r8] 12 [r12] 32 [r34] 33 [r35]

( 5 4 )->[6]->( 1 )
;; bb 6 artificial_defs: { }
;; bb 6 artificial_uses: { u-1(12){ }}
;; lr  in        1 [r1] 8 [r8] 12 [r12] 32 [r34] 33 [r35]
;; lr  use       8 [r8] 12 [r12] 32 [r34] 33 [r35]
;; lr  def       12 [r12] 320 [b0] 331 [ar.pfs]
;; lr  out       1 [r1] 8 [r8] 12 [r12] 320 [b0] 331 [ar.pfs]


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sje at gcc dot gnu dot org,
                   |                            |zadeck at gcc dot gnu dot
                   |                            |org


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

Reply via email to