https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122140
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Faust <[email protected]>: https://gcc.gnu.org/g:d14d24b26126ec9c6c8ba5b2e573ed8e26347e6b commit r16-5081-gd14d24b26126ec9c6c8ba5b2e573ed8e26347e6b Author: David Faust <[email protected]> Date: Thu Nov 6 14:24:14 2025 -0800 bpf: improve memmove inlining [PR122140] The BPF backend inline memmove expansion was broken for certain constructs. This patch addresses the two underlying issues: 1. Off-by-one in the "backwards" unrolled move loop offset. 2. Poor use of temporary register for the generated move loop, which could result in some of the loads performing the move to be optimized away when the source and destination of the memmove are based off of the same pointer. gcc/ PR target/122140 * config/bpf/bpf.cc (bpf_expand_cpymem): Fix off-by-one offset in backwards loop. Improve src and dest addrs used for the branch condition. (emit_move_loop): Improve emitted set insns and remove the explict temporary register.
