On 03/20/2018 02:46 PM, Jakub Jelinek wrote:
> Hi!
>
> On the following testcase, simplify_unary_operation is called on
> VEC_DUPLICATE from (vec_duplicate:V4SF something:SF) to V8SFmode,
> and simplify_unary_operation_1 tries an optimization usable for most
> unary operations, in particular it attempts to do
> (vec_duplicate:V8SF (unary:SF something:SF))
> which is reasonable for all unary ops other than when unary is
> vec_duplicate, because that needs a vector outer mode and scalar or vector
> inner mode, not scalar outer and inner mode.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
>
> 2018-03-20 Jakub Jelinek <ja...@redhat.com>
>
> PR rtl-optimization/84989
> * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
> VEC_DUPLICATE with scalar result mode.
>
> * gcc.target/i386/pr84989.c: New test.
OK.
jeff