On Tue, Mar 20, 2018 at 11:08:12AM +0100, Richard Biener wrote:
> With the x86 vectorizer cost-model rewrite we ended up costing
> scalar conversions as nothing.  After my patch using the proper
> target cost estimates for the scalar version this now exposes
> underestimating scalar cost and thus no longer vectorizing
> the testcase in this PR.  This fix is to restrict zero-costing
> to sign-conversions, all other conversions are possibly
> value-changing.  I guess some zero-extensions are free as well
> but I didn't want to get too fancy as I'm not sure about
> QImode -> SImode conversions for example since whether
> that's free (can just use %eax instead of %ax) likely depends on 
> context.

Aren't casts from integral to integral with smaller precision also always
zero cost, at least for scalar code?  It just expands to using a SUBREG
of whatever holds the larger value.

        Jakub

Reply via email to