https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114323
Christophe Lyon <clyon at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-03-14 Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> --- Tried a similar testcase for aarch64 (the intrinsics framework for MVE is very close to SVE's), and noticed that when running dse_classify_store() it sees a use of the initialized memory: svuint32_t foo () { const uint32_t D.11583[4]; svuint32_t V0; <bb 2> : D.11583[0] = 1; D.11583[1] = 2; D.11583[2] = 3; D.11583[3] = 4; V0_7 = svld1_u32 ({ -1, 0, 0, 0, ... }, &D.11583); D.11583 ={v} {CLOBBER(eol)}; return V0_7; } # .MEM_6 = VDEF <.MEM_ D.11583[3] = 4; # VUSE <.MEM_6> V0_7 = svld1_u32 ({ -1, 0, 0, 0, ... }, &D.11583); dse_classify_store() on arm/MVE does not see such a use and decides the initialization is a dead store.