https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122140

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by David Faust
<[email protected]>:

https://gcc.gnu.org/g:6c570fa99ea06981dfa01830ccfe68a9e5ec096d

commit r14-13012-g6c570fa99ea06981dfa01830ccfe68a9e5ec096d
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.

    (cherry picked from commit d14d24b26126ec9c6c8ba5b2e573ed8e26347e6b)

Reply via email to