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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

https://gcc.gnu.org/g:39e7936c2ba2dea099bca58d12d9d0721d4eae55

commit r17-4743-g39e7936c2ba2dea099bca58d12d9d0721d4eae55
Author: Richard Biener <[email protected]>
Date:   Mon Sep 28 10:31:40 2026 +0200

    [x86] fix load combining peepholes

    For the testcase in PR127633 we combine two adjacent DFmode loads from
    the stack into a V2DFmode via a peephole2 that uses adjust_address.
    That unfortunately leaves both the MEM_EXPR and the MEM_ALIAS_SET
    unaltered causing later scheduling to move the widened load before
    the store.  The fix is to instead use widen_memory_access which
    attempts to fixup MEM_EXPR and resets MEM_ALIAS_SET.

    To avoid regressing gcc.target/i386/sse{2,4_1}-init-v2df-2.c where
    ix86_split_stlf_stall_load splitted a V2DF load from a parameter
    but this being no longer visible with a cleared MEM_EXPR this
    adjusts ix86_operands_ok_for_move_multiple instead to avoid
    merging two loads from different parameters, not only those
    that ix86_split_stlf_stall_load handles.

            PR target/127633
            * config/i386/sse.md (movsd/movhpd to movupd): Use
            widen_memory_access instead of adjust_address to merge
            the MEMs.
            * config/i386/i386.cc (ix86_operands_ok_for_move_multiple):
            Avoid merging loads from different parameters.

            * gcc.target/i386/pr127633.c: New testcase.
            * gcc.target/i386/sse2-init-v2df-2.c: Adjust.
            * gcc.target/i386/sse4_1-init-v2df-2.c: Likewise.

Reply via email to