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

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #6)
> This works:
> 
> diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
> index 560e6525b56..f5d46296570 100644
> --- a/gcc/config/i386/i386.cc
> +++ b/gcc/config/i386/i386.cc
> @@ -8494,7 +8494,7 @@ ix86_find_all_reg_use_1 (rtx set, HARD_REG_SET
> &stack_slot_access,
>           auto_bitmap &worklist)
>  {
>    rtx dest = SET_DEST (set);
> -  if (!REG_P (dest))
> +  if (!GENERAL_REG_P (dest))
>      return;
>  
>    rtx src = SET_SRC (set);

This will prevent the ICE because we have copy from RAX to XMM:

  170: xmm0:DI=ax:DI
   98: xmm0:V2DI=vec_duplicate(xmm0:DI)
      REG_EQUIV vec_duplicate(`g_1680')
  101: [`g_1679']=xmm0:V2DI
  103: [const(`g_1679'+0x10)]=xmm0:V2DI
  105: [const(`g_1679'+0x20)]=xmm0:V2DI
  107: [const(`g_1679'+0x30)]=xmm0:V2DI

But does not fix the fact that your algorithm considers these accesses even
when they are in no way connected to stack or frame pointer. These do not even
use registers in their address.

Reply via email to