Hi! On Thu, Apr 08, 2021 at 11:24:04AM +0200, Jakub Jelinek wrote:
[ snip great explanation ] > The following patch fixes it, by doing the shift in inner_mode properly > and then after the shift doing the lowpart subreg and masking already > in mode. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Okay for trunk. Thank you! Segher > 2021-04-08 Jakub Jelinek <ja...@redhat.com> > > PR rtl-optimization/99905 > * combine.c (expand_compound_operation): If pos + len > modewidth, > perform the right shift by pos in inner_mode and then convert to mode, > instead of trying to simplify a shift of rtx with inner_mode by pos > as if it was a shift in mode. > > * gcc.target/i386/pr99905.c: New test.