------- Comment #5 from kkojima at gcc dot gnu dot org 2008-01-18 14:42 ------- With the patch in #4, .166r.split1 looks like:
(insn:HI 100 103 179 15 xxx.c:74 (set (subreg:SI (reg:DI 198 [ regno ]) 0) (reg/v:SI 159 [ regno ])) 172 {movsi_ie} (insn_list:REG_LIBCALL 180 (expr_list:REG_NO_CONFLICT (reg/v:SI 159 [ regno ]) (nil)))) (insn 179 100 180 15 xxx.c:74 (parallel [ (set (subreg:SI (reg:DI 198 [ regno ]) 4) (ashift:SI (reg/v:SI 159 [ regno ]) (const_int 1 [0x1]))) (set (reg:SI 147 t) (lt:SI (reg/v:SI 159 [ regno ]) (const_int 0 [0x0]))) ]) -1 (nil)) (insn 180 179 106 15 xxx.c:74 (set (subreg:SI (reg:DI 198 [ regno ]) 4) (neg:SI (reg:SI 147 t))) -1 (insn_list:REG_RETVAL 0 (nil))) It should be REG_RETVAL 100 instead of REG_RETVAL 0, shouldn't be? How does look the patch below? --- ORIG/trunk/gcc/emit-rtl.c 2008-01-15 09:35:12.000000000 +0900 +++ LOCAL/trunk/gcc/emit-rtl.c 2008-01-18 21:12:39.000000000 +0900 @@ -3136,7 +3136,7 @@ try_split (rtx pat, rtx trial, int last) rtx before = PREV_INSN (trial); rtx after = NEXT_INSN (trial); int has_barrier = 0; - rtx tem, note_retval; + rtx tem, note_retval, note_libcall; rtx note, seq; int probability; rtx insn_last, insn; @@ -3284,6 +3284,18 @@ try_split (rtx pat, rtx trial, int last) XEXP (note_retval, 0) = insn_last; break; + case REG_RETVAL: + /* Relink the insns with REG_RETVAL note and with REG_LIBCALL note + after split. */ + REG_NOTES (insn_last) + = gen_rtx_INSN_LIST (REG_RETVAL, + XEXP (note, 0), + REG_NOTES (insn_last)); + + note_libcall = find_reg_note (XEXP (note, 0), REG_LIBCALL, NULL); + XEXP (note_libcall, 0) = insn_last; + break; + default: break; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34808