On Wed, Feb 8, 2012 at 1:41 PM, Bernd Schmidt <ber...@codesourcery.com> wrote: > On 02/08/2012 01:12 PM, Richard Guenther wrote: >> On Wed, Feb 8, 2012 at 1:02 PM, Bernd Schmidt <ber...@codesourcery.com> >> wrote: >>> On 02/07/2012 11:33 PM, Steven Bosscher wrote: >>>> On Tue, Feb 7, 2012 at 11:19 PM, Ramana Radhakrishnan >>>> <ramana.radhakrish...@linaro.org> wrote: >>>>> Hi Andrew >>>>> >>>>> I find it interesting that cond_exec's in this form survive all the >>>>> way till reload and "work". AFAIK we could never have cond_exec's >>>>> before reload . >>>> >>>> There is nothing wrong per-se with cond_execs before reload, as long >>>> as you don't have to reload a predicate pseudo-reg. >>> >>> I thought the problem was that we'd have to emit conditional reload >>> insns and inheritance wouldn't work. >> >> It probably depends on how DF sees conditional uses / defs. If they >> look like regular uses / defs then I suppose un-conditional spills/reloads >> are fine - otherwise of course you'd corrupt one of the two register set >> states. > > I'm pretty sure conditional defs are always RMW, but I'd have to go > look. Can't imagine it working otherwise though.
I was thinking about (cond_exec 1 (set (reg:SI 30) (...))) (cond_exec 0 (set (reg:SI 30) (...))) (cond_exec 1 (use (reg:SI 30) (...))) where if we spill/reload 30 with non-cond_exec stmts then we might clobber the shared register set of the conditional execution paths. Similar of course shared stack space if we happen to spill/reload in both paths. If of course defs/uses of both paths conflict and get different hard registers assigned the register issue doesn't exist, still the shared spill stack space issue may. Richard.