On Tue, Mar 20, 2018 at 3:08 AM, Richard Biener <rguent...@suse.de> 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.
>
> Bootstrap and regtest running on x86_64-unknown-linux-gnu.
>
> OK?
>
> Thanks,
> Richard.
>
> 2018-03-20  Richard Biener  <rguent...@suse.de>
>
>         PR target/84986
>         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
>         sign-conversions as zero, fall back to standard scalar_stmt
>         cost for the rest.
>
>         * gcc.dg/vect/costmodel/x86_64/costmodel-pr84986.c: New testcase.
>

The test failed for -mx32:

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

-- 
H.J.

Reply via email to