Hi, One small note I forgot to mention:
The assembler scan patterns in the tests are written to be whitespace-agnostic, since assembler formatting is not stable across different setups. Best regards, Denis -- Denis Dolya (Ferki) GCC contributor GitHub: https://github.com/Ferki-git-creator ср, 4 лют. 2026 р., 12:01 користувач Доля Денис <[email protected]> пише: > Hello, > > this patch fixes PR tree-optimization/94071 by improving the store-merging > pass to recognize adjacent byte loads even when offsets are computed > through simple SSA expressions. > > The change teaches the pass to decompose offset expressions into > base plus constant, allowing patterns like data[i] and data[i + 1] > to be merged into halfword loads even when temporaries or helper > functions are involved. > > An AArch64 testsuite case is added to verify the optimization. > > Tested on aarch64-linux-gnu: > > make check-gcc > RUNTESTFLAGS="aarch64.exp=gcc.target/aarch64/adjacent-byte-load-merge.c" > > The patch is attached. > > Any feedback is welcome. > > Best regards, > Denis Dolya > > -- > Denis Dolya (Ferki) > GCC contributor > GitHub: https://github.com/Ferki-git-creator >
