Re: [PATCH] Fix PR84986

2018-03-24 Thread H.J. Lu
On Tue, Mar 20, 2018 at 3:08 AM, 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 long

Re: [PATCH] Fix PR84986

2018-03-20 Thread Jan Hubicka
The way i originally made the code was going through ix86_rtx_costs and factoring out/simplifying logic that translates directly to trees. With NOP_EXPR I probably only tought of subgregs and other free stuff which truly_noop_* probably simulates quite well. ix86_rtx_costs understand how to zero

Re: [PATCH] Fix PR84986

2018-03-20 Thread Jakub Jelinek
On Tue, Mar 20, 2018 at 11:41:01AM +0100, Richard Biener wrote: > If the precision matches the mode maybe. But I thought we try to > avoid using %al (HImode) or %ax (QImode) operands in the end? Yes, but we try to do that only on the level of the emitted assembly, sometimes we simply emit a QImod

Re: [PATCH] Fix PR84986

2018-03-20 Thread Jakub Jelinek
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 n

Re: [PATCH] Fix PR84986

2018-03-20 Thread Richard Biener
On Tue, 20 Mar 2018, Jakub Jelinek wrote: > On Tue, Mar 20, 2018 at 11:41:01AM +0100, Richard Biener wrote: > > If the precision matches the mode maybe. But I thought we try to > > avoid using %al (HImode) or %ax (QImode) operands in the end? > > Yes, but we try to do that only on the level of t

Re: [PATCH] Fix PR84986

2018-03-20 Thread Richard Biener
On Tue, 20 Mar 2018, Jakub Jelinek wrote: > 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 n

[PATCH] Fix PR84986

2018-03-20 Thread Richard Biener
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