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

--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Hongyu Wang from comment #9)
> The difference is, -mno-unroll-only-small-loops -O2 would cause
> rtl-loop-unroll takeing effect,

No.  -m{no-,}unroll-only-small-loops does not enable or disable loop unrolling
at all.  The only thing it does is modify which loops are candidate to be
unrolled.

> I think the intension of -munroll-only-small-loops is to just adjust
> rtl-loop-unrolling and do not touch middle-end unroll/cunroll.

It modifies the behaviour of -funroll-loops.  It doesn't do anythyng else.
Anything that wants to see if unrolling is active can just look if
flag_unroll_loops is set.  The sane and simple thing.

> But I think
> your point is also reasonable. Maybe we can split the flag_unroll_loops to
> tree and rtl seperately?

Users do not care if something is done on Gimple or on RTL.  The command line
flags are for users.  They work fine as-is.

> Anyway I will propose a patch and re-discuss with maintainers later. Thanks!

Please fix this regression asap.  It is a P1, and we are in stage 3 already.

Reply via email to