[Bug tree-optimization/105740] missed optimization switch transformation for conditions with duplicate conditions
rguenth at gcc dot gnu.org
Tue Jun 21 09:02:24 GMT 2022
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
IIRC switch conversion was run early originally because it was supposed to
improve inlining heuristics. One might view if-to-switch + switch-conversion
as canonicalization which would mean running it before things like jump
threading or loop opts (most don't like switches at least). Then one might
view if-to-switch + switch-conversion as (target specific) code generation
optimization (for that we also have pass_lower_switch, so one thing would
be re-running if-to-switch before that again, supposed pass_lower_switch
also performs the transforms switch-conversion does).
I usually don't like running things again and again.
More information about the Gcc-bugs