https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111154
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |88443 Ever confirmed|0 |1 Last reconfirmed| |2023-08-25 Status|UNCONFIRMED |NEW Component|c |tree-optimization Target| |aarch64 Keywords| |diagnostic --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. Reproduces with -O3 -march=armv8.3-a and unsigned char desta[8]; void copya(unsigned char *src, int size) { for (int i = 0; i < size; i++) desta[i] = src[i]; } we end up with a peeled epilogue: if (_12 == niters_vector_mult_vf.6_39) goto <bb 26>; [12.50%] else goto <bb 6>; [87.50%] <bb 6> [local count: 73583527]: _96 = MEM[(unsigned char *)src_8(D) + 8B]; desta[_36] = _96; if (size_7(D) > 9) goto <bb 7>; [85.71%] else goto <bb 27>; [14.29%] <bb 27> [local count: 10511932]: goto <bb 21>; [100.00%] <bb 7> [local count: 63071596]: _103 = MEM[(unsigned char *)src_8(D) + 9B]; desta[9] = _103; if (size_7(D) != 10) goto <bb 8>; [85.71%] else goto <bb 28>; [14.29%] <bb 28> [local count: 9010228]: goto <bb 21>; [100.00%] <bb 8> [local count: 54061368]: _110 = MEM[(unsigned char *)src_8(D) + 10B]; desta[10] = _110; if (size_7(D) != 11) goto <bb 9>; [85.71%] else goto <bb 29>; [14.29%] ... Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 [Bug 88443] [meta-bug] bogus/missing -Wstringop-overflow warnings