Ajit Agarwal <aagar...@linux.ibm.com> writes: >>> diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc >>> index 1856fa4884f..ffc47a6eaa0 100644 >>> --- a/gcc/emit-rtl.cc >>> +++ b/gcc/emit-rtl.cc >>> @@ -921,7 +921,7 @@ validate_subreg (machine_mode omode, machine_mode imode, >>> return false; >>> >>> /* The subreg offset cannot be outside the inner object. */ >>> - if (maybe_ge (offset, isize)) >>> + if (maybe_gt (offset, isize)) >>> return false; >> >> Can you explain why this change is needed? >> > > This is required in rs6000 target where we generate the subreg > with offset 16 from OO mode (256 bit) to 128 bit vector modes. > Otherwise it segfaults.
Could you go into more detail? Why does that subreg lead to a segfault? In itself, a 16-byte subreg at byte offset 16 into a 32-byte pair is pretty standard. AArch64 uses this too for its vector load/store pairs (and for structure pairs more generally). Thanks, Richard