On Thu, 19 Mar 2020, Richard Sandiford wrote:

> In this PR we had a 512-bit VECTOR_TYPE whose mode is XImode
> (an integer mode used for four 128-bit vectors).  When trying
> to expand a zero constant for it, we hit code in expand_expr_real_1
> that tries to use the associated integer type instead.  The code used
> type_for_mode (XImode, 1) to get this integer type.
> 
> However, the c-family implementation of type_for_mode checks for
> any registered built-in type that matches the mode and has the
> right signedness.  This meant that it could return a built-in
> vector type when given an integer mode (particularly if, as here,
> the vector type isn't supported by the current subtarget and so
> TYPE_MODE != TYPE_MODE_RAW).  The expand code would then cycle
> endlessly trying to use this "new" type instead of the original
> vector type.
> 
> The search loop is probably too lax in other ways -- e.g. it could
> return records that just happen to have the right mode -- but this
> seems like a safe, incremental improvement.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to