https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123417

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> (In reply to Andrew Pinski from comment #5)
> > So it turns out we set LOOPS_MAY_HAVE_MULTIPLE_LATCHES a few places through
> > the compiling. BUT LOOPS_MAY_HAVE_MULTIPLE_LATCHES does not mean don't
> > protect the latch. It rather means the current state might have multiple
> > latches but it is best to protect the latches.
> 
> It's always best to protect latches for the purpose of tracking loops and
> optimization.  But actual assembler can be sometimes better when you can
> merge loop headers of a nest, esp. when BB re-ordering confuses things
> (IIRC).

Right on the gimple level protecting latches always seems like a good idea as
it will get merged on the RTL level (some [most?] of the time). So the patch I
am testing does that.

Reply via email to