This is the mail archive of the gcc-patches@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]

[PATCH] fix ifcvt ICE


Hi!

Following patchlet fixes an ICE when trying to compile jni.cc from libgcj on
sparc64-linux with -mcpu=ultrasparc -mvis -mno-app-regs -mcmodel=medany -O2.
Basically, noce_process_if_block removes the jump_insn 324 and one of the
identical sets which are present in both block 15 successors and then
update_life_info is called. As it is UPDATE_LIFE_LOCAL only, but scans and
kills dead code (May 20 change), it kills the insn 323 which is now dead,
but this removes all usages of pseudo 112 from that basic block. And the
UPDATE_LIFE_LOCAL implies calling verify_local_live_at_start which aborts
because pseudo 112 has been removed from the live at start regset.
Ok to commit if just started bootstrap succeeds?

2000-05-23  Jakub Jelinek  <jakub@redhat.com>

	* ifcvt.c (if_convert): Update life info globally.

--- gcc/ifcvt.c.jj	Sun May 21 21:13:17 2000
+++ gcc/ifcvt.c	Tue May 23 14:21:22 2000
@@ -2037,7 +2037,7 @@ if_convert (life_data_ok)
 	  SET_BIT (update_life_blocks, block_num);
 
       count_or_remove_death_notes (update_life_blocks, 1);
-      update_life_info (update_life_blocks, UPDATE_LIFE_LOCAL,
+      update_life_info (update_life_blocks, UPDATE_LIFE_GLOBAL,
 			PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE
 			| PROP_KILL_DEAD_CODE);
 



;; Start of basic block 15, registers live: 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 107 108 112
(code_label 312 311 481 22 "" "" [1 uses])

(note 481 312 318 [bb 15] NOTE_INSN_BASIC_BLOCK 0)

(insn 318 481 319 (set (reg:DI 165)
        (high:DI (unspec:DI[ 
                    (symbol_ref:DI ("_Jv_floatClass"))
                ]  0))) 66 {movdi_high_pic} (nil)
    (expr_list:REG_EQUAL (high:DI (unspec:DI[ 
                    (symbol_ref:DI ("_Jv_floatClass"))
                ]  0))
        (nil)))

(insn 319 318 321 (set (reg:DI 165)
        (lo_sum:DI (reg:DI 165)
            (unspec:DI[ 
                    (symbol_ref:DI ("_Jv_floatClass"))
                ]  0))) 65 {movdi_lo_sum_pic} (insn_list 318 (nil))
    (nil))

(insn 321 319 323 (set (reg:DI 164)
        (mem/u:DI (plus:DI (reg:DI 23 %l7)
                (reg:DI 165)) 0)) 62 {*movdi_insn_sp64_vis} (insn_list 319 (nil))
    (expr_list:REG_DEAD (reg:DI 165)
        (expr_list:REG_EQUAL (symbol_ref:DI ("_Jv_floatClass"))
            (nil))))

(insn 323 321 324 (set (reg:CCX 100 %icc)
        (compare:CCX (reg:DI 112)
            (reg:DI 164))) 1 {*cmpdi_sp64} (insn_list 321 (nil))
    (expr_list:REG_DEAD (reg:DI 112)
        (expr_list:REG_DEAD (reg:DI 164)
            (nil))))

(jump_insn 324 323 331 (set (pc)
        (if_then_else (ne (reg:CCX 100 %icc)
                (const_int 0 [0x0]))
            (label_ref 349)
            (pc))) 37 {*normal_branch} (insn_list 323 (nil))
    (expr_list:REG_DEAD (reg:CCX 100 %icc)
        (expr_list:REG_BR_PROB (const_int 6001 [0x1771])
            (nil))))
;; End of basic block 15, registers live:
 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 107 108

(note 331 324 334 0x7031c9a0 NOTE_INSN_BLOCK_BEG 0)

(note 334 331 482 0x7031c9c0 NOTE_INSN_BLOCK_BEG 0)

;; Start of basic block 16, registers live: 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 107 108
(note 482 334 337 [bb 16] NOTE_INSN_BASIC_BLOCK 0)

(insn 337 482 342 (set (reg/v:DI 126)
        (plus:DI (reg/v:DI 107)
            (const_int 24 [0x18]))) 176 {*adddi3_sp64} (nil)
    (expr_list:REG_DEAD (reg/v:DI 107)
        (nil)))

(note 342 337 343 0x7031c9c0 NOTE_INSN_BLOCK_END 0)

(note 343 342 347 0x7031c9a0 NOTE_INSN_BLOCK_END 0)

(jump_insn 347 343 348 (set (pc)
        (label_ref 416)) -1 (nil)
    (nil))
;; End of basic block 16, registers live:
 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 108 126

(barrier 348 347 349)

;; Start of basic block 17, registers live: 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 107 108
(code_label 349 348 484 25 "" "" [1 uses])

(note 484 349 399 [bb 17] NOTE_INSN_BASIC_BLOCK 0)

(insn 399 484 368 (set (reg/v:DI 126)
        (plus:DI (reg/v:DI 107)
            (const_int 24 [0x18]))) 176 {*adddi3_sp64} (nil)
    (expr_list:REG_DEAD (reg/v:DI 107)
        (nil)))
;; End of basic block 17, registers live:
 14 [%sp] 23 [%l7] 30 [%fp] 31 [%i7] 108 126


	Jakub

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