Applied to master (with fixed-up commit message). Thanks! --Philipp.
On Sun, 29 Dec 2024 at 17:58, Jeff Law <jeffreya...@gmail.com> wrote: > > > > On 12/17/24 4:51 AM, Konstantinos Eleftheriou wrote: > > From: kelefth <konstantinos.elefther...@vrull.eu> > > > > During the initialization of the base register for the zero-offset store, in > > the case that we are eliminating the load, we used a paradoxical subreg > > assuming that we don't care about the higher bits of the register. This led > > to > > writing wrong values when we were not updating the whole register. > > > > This patch fixes the issue by zero-extending the value stored in the base > > register instead of using a paradoxical subreg. > > > > Bootstrapped/regtested on x86 and AArch64. > > > > PR rtl-optimization/117835 > > > > gcc/ChangeLog: > > > > * avoid-store-forwarding.cc > > (store_forwarding_analyzer::process_store_forwarding): > > Zero-extend the value stored in the base register instead of using a > > paradoxical subreg. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/i386/pr117835.c: New test. > OK. Please reference both bugs in the commit message though (117872 > being the other instance of this bug). > > Thanks. > jeff > >