------- Comment #30 from jakub at gcc dot gnu dot org  2007-12-11 15:07 -------
mark_target_live_regs doesn't recognize %r28 as live on the fallthrough insn
after the branch.  There are no BARRIER insns before that fallthrough insn (the
jump is conditional and there are no unconditional jumps before that), so
find_basic_block gives b == 2, i.e. ENTRY successor.  Basic block has:
;; basic block 2, loop depth 0, count 0
;; prev block 0, next block 3
;; pred:       ENTRY [100.0%]  (fallthru)
;; succ:       24 [26.7%]  (can_fallthru) 3 [73.3%]  (fallthru,can_fallthru)
;; bb 2 artificial_defs: { }
;; bb 2 artificial_uses: { u-1(30){ }}
;; lr  in        2 [%r2] 3 [%r3] 4 [%r4] 5 [%r5] 6 [%r6] 7 [%r7] 8 [%r8] 9
[%r9] 10 [%r10] 11 [%r11] 12 [%r12] 23 [%r23] 24 [%r24] 25 [%r25] 26 [%r26] 28
[%r28] 30 [%r30]
;; lr  use       2 [%r2] 3 [%r3] 4 [%r4] 5 [%r5] 6 [%r6] 7 [%r7] 8 [%r8] 9
[%r9] 10 [%r10] 11 [%r11] 12 [%r12] 23 [%r23] 24 [%r24] 25 [%r25] 26 [%r26] 28
[%r28] 30 [%r30]
;; lr  def       3 [%r3] 5 [%r5] 6 [%r6] 7 [%r7] 8 [%r8] 30 [%r30]
;; live  in      2 [%r2] 3 [%r3] 4 [%r4] 5 [%r5] 6 [%r6] 7 [%r7] 8 [%r8] 9
[%r9] 10 [%r10] 11 [%r11] 12 [%r12] 23 [%r23] 24 [%r24] 25 [%r25] 26 [%r26]
;; live  gen     3 [%r3] 5 [%r5] 6 [%r6] 7 [%r7] 8 [%r8] 30 [%r30]
;; live  kill

In reality %r28 is live from the caller and used (multiple times) throughout
the function, but it is not among df_get_live_in (BASIC_BLOCK (2)), but e.g. in
lr in.  CCing dataflow maintainers if they have ideas what's wrong here.


-- 

jakub at gcc dot gnu dot org changed:

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


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

Reply via email to