As usual with costing changes, the patch exposes latent problem. The patched compiler tries to generate non-existing DImode move from mask register to XMM register, and ICEs during reload [1]. Attached patch tightens secondary_reload_needed condition and fixes the issue.
I'm bootstrapping and regression testing patch, and will submit a formal submission later today. [1] https://gcc.gnu.org/ml/gcc-regression/2019-08/msg00537.html Uros. On Thu, Aug 29, 2019 at 9:53 AM Uros Bizjak <ubiz...@gmail.com> wrote: > > On Wed, Aug 28, 2019 at 5:12 PM Uros Bizjak <ubiz...@gmail.com> wrote: > > > > Attached patch improves costing for STV shifts and corrects reject > > condition for out of range shift count operands. > > > > 2019-08-28 Uroš Bizjak <ubiz...@gmail.com> > > > > * config/i386/i386-features.c > > (general_scalar_chain::compute_convert_gain): > > Correct cost for double-word shifts. > > (general_scalar_to_vector_candidate_p): Reject count operands > > greater or equal to mode bitsize. > > > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > > > Committed to mainline SVN. > > Ouch... I mixed up patches and actually committed the patch that > removes maximum from cost of sse<->int moves. > > I can leave the patch for a day, so we can see the effects of the cost > change, and if the patch creates problems, I'll revert it. > > Sorry for the mixup, > Uros.