On Fri, Feb 12, 2021 at 02:50:12PM -0600, Peter Bergner wrote:
> The rs6000_emit_le_vsx_* functions assume they are not passed an Altivec
> style "& ~16" address.  However, some of our expanders and splitters do
> not verify we do not have an Altivec style address before calling those
> functions, leading to an ICE.  The solution here is to guard the expanders
> and splitters to ensure we do not call them if we're given an Altivec style
> address.

> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -10059,6 +10059,11 @@ rs6000_const_vec (machine_mode mode)
>  void
>  rs6000_emit_le_vsx_permute (rtx dest, rtx source, machine_mode mode)
>  {
> +  if (MEM_P (dest))
> +    gcc_assert (!altivec_indexed_or_indirect_operand (dest, mode));
> +  if (MEM_P (source))
> +    gcc_assert (!altivec_indexed_or_indirect_operand (source, mode));

altivec_indexed_or_indirect_operand returns false if passed something
not a mem, so this is just

  gcc_assert (!altivec_indexed_or_indirect_operand (dest, mode));
  gcc_assert (!altivec_indexed_or_indirect_operand (source, mode));

Please retest with that tweak.  Okay for trunk.  Thanks!

Also okay for GCC 10.  Do you need backports to earlier?  Which then?


Segher

Reply via email to