This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using and clobbering hard regs in parallel
- To: Stephen Clarke <Stephen dot Clarke at st dot com>
- Subject: Re: Using and clobbering hard regs in parallel
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 19 Jul 2001 18:55:37 -0700
- CC: gcc at gcc dot gnu dot org
- References: <3B578A15.A5A260C6@st.com>
Stephen Clarke <Stephen.Clarke@st.com> writes:
> Is it valid in RTL to read a hard reg in one branch of a parallel,
> and clobber the same hard reg in another branch?
>
> For example, when compiling for SH, I get the following instruction:
>
> (insn 20 19 22 (parallel[
> (set (reg:SI 54)
> (udiv:SI (reg:SI 4 r4)
> (reg:SI 5 r5)))
> (clobber (reg:SI 18 t))
> (clobber (reg:SI 17 pr))
> (clobber (reg:SI 4 r4))
> (use (reg:SI 55))
> ] ) -1 (nil)
> (expr_list:REG_EQUAL (udiv:SI (mem/f:SI (reg/f:SI 50 virtual-stack-vars) 0)
> (mem/f:SI (plus:SI (reg/f:SI 50 virtual-stack-vars)
> (const_int 4 [0x4])) 0))
> (insn_list:REG_RETVAL 17 (nil))))
>
> where r4 is read by the set, but also clobbered in another branch
> (this instruction is part of a libcall).
Yes, what this means is that r4 holds an input at the start of the
insn but some other (unspecified) value at the end of the insn.
--
- Geoffrey Keating <geoffk@geoffk.org>