On Mon, Jan 29, 2024 at 01:05:51PM +0100, Richard Biener wrote: > The following implements storing to a non-MEM_P with a variable > offset. We usually avoid this by forcing expansion to memory but > this doesn't work for hard register variables. The solution is > to spill and operate on the stack. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > I realize the flow is a bit awkward, but short of duplicating a lot > of code I can't see a better way. Forcing some lowering on GIMPLE > (creating the copy there) might be another away. But then we > could possibly lower the whole vector indexing in a different way > in the first place ... > > Thanks, > Richard. > > PR middle-end/113622 > * expr.cc (expand_assignment): Spill hard registers if > we index them with a variable offset. > > * gcc.target/i386/pr113622-2.c: New testcase. > * gcc.target/i386/pr113622-3.c: Likewise.
Ok, thanks. Jakub