On Wed, 11 Nov 2020 at 20:59, Jakub Jelinek <ja...@redhat.com> wrote: > > > > The simplification that distributes the shift (i.e. the one that Jakub > > referred > > to as fighting the new rule) is also run after GIMPLE has been expanded to > > RTX. In my understanding, this still implies that even if we have a > > cost-aware > > expansion, this existing rule will nonetheless distribute the shift. > > At the RTL level, such simplifications should not happen if it is > against costs (e.g. combine but various other passes too check costs and > punt if the new code would be more costly than the old one).
I agree. Let me go back and investigate if the cost-model is misreading things, before we continue the discussion. Philipp.