This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
REG_LIBCALL noop move problems
- To: gcc at gcc dot gnu dot org
- Subject: REG_LIBCALL noop move problems
- From: John Wehle <john at feith dot com>
- Date: Wed, 3 Oct 2001 18:40:17 -0400 (EDT)
Compiling gcc.c-torture/unsorted/BUG25.c on HP-PA with
-O2 yields the following bit of rtl after addressof runs:
(insn 11 23 12 (set (reg:SI 26 %r26)
(reg:SI 26 %r26)) 68 {*pa.md:2088} (nil)
(insn_list:REG_LIBCALL 14 (nil)))
(call_insn 12 11 14 (parallel[
(set (reg:SI 28 %r28)
(call (mem:SI (symbol_ref:SI ("@ffs")) 0)
(const_int 16 [0x10])))
(clobber (reg:SI 2 %r2))
(use (const_int 0 [0x0]))
] ) 275 {call_value_internal_symref} (nil)
(expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
(nil))
(expr_list (use (reg:SI 26 %r26))
(nil)))
(insn 14 12 15 (set (reg:SI 96)
(reg:SI 28 %r28)) 68 {*pa.md:2088} (nil)
(insn_list:REG_RETVAL 11 (expr_list:REG_EQUAL (ffs:SI (reg:SI 26 %r26))
(nil))))
Running life_analysis (in order to setup things need by VRP)
causes insn 11 to be deleted by delete_noop_moves which
orphans the REG_RETVAL note. Things later splat in propagate_block
as it walks off the beginning of the function due to the REG_RETVAL
note pointing to a deleted insn which is now before basic block 0.
Should delete_noop_moves skip an insn with a REG_LIBCALL note,
simply move the note to the next real insn (adjusting the REG_RETVAL
note), or should the problem be solved in some other fashion?
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------