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

--- Comment #20 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 19 Oct 2023, juzhe.zhong at rivai dot ai wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111720
> 
> --- Comment #19 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
> (In reply to Richard Biener from comment #18)
> > With RVV you have intrinsic calls in GIMPLE so nothing to optimize:
> > 
> > vbool8_t fn ()
> > {
> >   vbool8_t vmask;
> >   vuint8m1_t vand_m;
> >   vuint8m1_t varr;
> >   uint8_t arr[32];
> > 
> >   <bb 2> [local count: 1073741824]:
> >   arr =
> > "\x01\x02\x07\x01\x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t\x01\x02\x07\x01
> > \x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t";
> >   varr_3 = __riscv_vle8_v_u8m1 (&arr, 32); [return slot optimization]
> >   vand_m_4 = __riscv_vand_vx_u8m1 (varr_3, 1, 32); [return slot 
> > optimization]
> >   vmask_5 = __riscv_vreinterpret_v_u8m1_b8 (vand_m_4); [return slot
> > optimization]
> >   <retval> = vmask_5;
> >   arr ={v} {CLOBBER(eol)};
> >   return <retval>;
> > 
> > and on RTL I see lots of UNSPECs, RTL opts cannot do anything with those.
> > 
> > This is what Andrew said already.
> 
> Ok. I wonder why this issue is gone when I change it into:
> 
> arr as static
> 
> https://godbolt.org/z/Tdoshdfr6

Because the stacik initialization isn't required then.

Reply via email to