https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108177
Bug ID: 108177 Summary: MVE predicated stores to same address get optimized away Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: avieira at gcc dot gnu.org Target Milestone: --- GCC currently generates wrong code for predicated MVE stores to the same address. Like: #include <arm_mve.h> uint8x16_t foo (uint8x16_t a, uint8_t *pa, mve_pred16_t p1, mve_pred16_t p2) { vstrbq_p_u8 (pa, a, p1); vstrbq_p_u8 (pa, a, p2); } with 'gcc -mcpu=cortex-m55 -mfloat-abi=hard -O3' it will only generate the second MVE store. Though if (p2 | p1) != p2 then the second store will not fully overwrite the first.