Message ID | 293c6900-a6b8-9bcb-9752-5f41554e80c5@ventanamicro.com |
---|---|
State | New |
Headers | show |
Series | [committed,RISC-V] Fix recent rvv/base/spill testcase failures | expand |
LGTM, thanks :) On Wed, Nov 23, 2022 at 7:21 AM Jeff Law <jlaw@ventanamicro.com> wrote: > > As Jaiwei noted, many (all?) of the rvv/base/spill tests started failing > after the introduction of shrink-wrapping. > > > The core issue is we're expecting the frame to have a constant size, but > it doesn't. So when using the to_constant method we abort. > > > The safest thing to do is to set no shrink-wrapping components when the > frame size is not fixed. We might be able to do better later -- iff we > know the offset to the GPRs/FPRs is fixed and fits into the appropriate > number of bits. > > > Bootstrapped and regression tested (C-only) on riscv64-linux-gnu. As > expected, it fixes a bucketload of failures in rvv/base/spill-*.c. > > > Installed on the trunk, > > Jeff
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 7ec4ce97e6c..7bfc0e9f595 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -5340,7 +5340,8 @@ riscv_get_separate_components (void) bitmap_clear (components); if (riscv_use_save_libcall (&cfun->machine->frame) - || cfun->machine->interrupt_handler_p) + || cfun->machine->interrupt_handler_p + || !cfun->machine->frame.gp_sp_offset.is_constant ()) return components; offset = cfun->machine->frame.gp_sp_offset.to_constant ();