Committed, thanks Jeff. Let's wait for a while before backporting.

Pan

-----Original Message-----
From: Jeff Law <jeffreya...@gmail.com> 
Sent: Monday, May 20, 2024 12:23 AM
To: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org
Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Liu, Hongtao 
<hongtao....@intel.com>; richard.guent...@gmail.com
Subject: Re: [PATCH v4] DSE: Fix ICE after allow vector type in get_stored_val



On 5/2/24 7:51 PM, pan2...@intel.com wrote:
> From: Pan Li <pan2...@intel.com>
> 
> We allowed vector type for get_stored_val when read is less than or
> equal to store in previous.  Unfortunately,  the valididate_subreg
> treats the vector type's size is less than vector register as
> invalid.  Then we will have ICE here.
> 
> This patch would like to fix it by filter-out the invalid type size,
> and make sure the subreg is valid for both the read_mode and store_mode
> before perform the real gen_lowpart.
> 
> The below test suites are passed for this patch:
> 
> * The x86 bootstrap test.
> * The x86 regression test.
> * The riscv rv64gcv regression test.
> * The riscv rv64gc regression test.
> * The aarch64 regression test.
> 
> gcc/ChangeLog:
> 
>       * dse.cc (get_stored_val): Make sure read_mode/write_mode
>       is valid subreg before gen_lowpart.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.target/riscv/rvv/base/bug-6.c: New test.
OK for the trunk.  Let's let it simmer on the trunk for a while before 
we consider backporting.

jeff

Reply via email to