Re: [PATCH] expr.cc: Optimize if char array initialization consists of all zeros

2022-06-26 Thread Jeff Law via Gcc-patches
On 5/30/2022 9:35 PM, Takayuki 'January June' Suwa via Gcc-patches wrote: Hi all, In some targets, initialization code for char array may be split into two parts even if the initialization consists of all zeros: /* example */ extern void foo(char*); void test(void) {   char a[256] = { 0, 0,

Re: [PATCH] expr.cc: Optimize if char array initialization consists of all zeros

2022-06-01 Thread Richard Biener via Gcc-patches
On Tue, May 31, 2022 at 5:37 AM Takayuki 'January June' Suwa via Gcc-patches wrote: > > Hi all, > > In some targets, initialization code for char array may be split into two > parts even if the initialization consists of all zeros: > > /* example */ > extern void foo(char*); > void test(void) { >

[PATCH] expr.cc: Optimize if char array initialization consists of all zeros

2022-05-30 Thread Takayuki 'January June' Suwa via Gcc-patches
Hi all, In some targets, initialization code for char array may be split into two parts even if the initialization consists of all zeros: /* example */ extern void foo(char*); void test(void) { char a[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; foo(a); } ;; Xtensa (xtensa-lx106) .LC0: