From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id 8B6CE384603C; Tue, 22 Nov 2022 23:19:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B6CE384603C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669159184; bh=oN7lILL9GQaBtYqNYDGX7Pjg0VnBgf87mUF2n+ux4Yk=; h=From:To:Subject:Date:From; b=htuSSXdNPZzEJ5juH7QXUZBaBRfyzVdA95br+Kn5ZWFiQToDvL53Qj6xhLpK9dwT3 Gm/E1D3/B//Wj7rUua8f+F9DpkuJJCbGrGQ3vT3lC+mfV0sCvzVUKqwaKGG+KVO86r cMZlZllFHC1/49H46h7RUkObCOdhFt07wrtSE0KU= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4251] Fix recent rvv/base/spill testcase failures X-Act-Checkin: gcc X-Git-Author: Jeff Law X-Git-Refname: refs/heads/master X-Git-Oldrev: e5cfb9cac1d7aba9a8ea73bfe7922cfaff9d61f3 X-Git-Newrev: ca73d4c80ea06087d9dd22594e5670bb15e21066 Message-Id: <20221122231944.8B6CE384603C@sourceware.org> Date: Tue, 22 Nov 2022 23:19:44 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ca73d4c80ea06087d9dd22594e5670bb15e21066 commit r13-4251-gca73d4c80ea06087d9dd22594e5670bb15e21066 Author: Jeff Law Date: Tue Nov 22 18:12:45 2022 -0500 Fix recent rvv/base/spill testcase failures he 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. gcc/ * config/riscv/riscv.cc (riscv_get_separate_components): Do not do shrink-wrapping for a frame with a variable size. Diff: --- gcc/config/riscv/riscv.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ();