From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115700 invoked by alias); 21 Jan 2020 16:14:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 115609 invoked by uid 89); 21 Jan 2020 16:14:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_FAIL autolearn=ham version=3.3.1 spammy=H*UA:16.0, H*x:16.0, expr_list, H*UA:Outlook X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Jan 2020 16:14:29 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itwAc-0005Tc-6k for gcc-patches@gcc.gnu.org; Tue, 21 Jan 2020 11:14:27 -0500 Received: from serveronline.org ([78.46.86.77]:49063 helo=franke.ms) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itwAc-0005QS-0Z for gcc-patches@gcc.gnu.org; Tue, 21 Jan 2020 11:14:26 -0500 Received: from ZETRA (x590feccf.dyn.telefonica.de [89.15.236.207]) by serveronline.org (BEJY V1.6.12-SNAPSHOT (c) 2000-2019 by BebboSoft, Stefan "Bebbo" Franke, all rights reserved) with SMTP id 16fc8e220daebf23dd49a752955 from stefan@franke.ms for gcc-patches@gcc.gnu.org; Tue, 21 Jan 2020 17:14:20 +0100 From: To: Subject: [PATCH] remove bogus asserts in expr.c Date: Tue, 21 Jan 2020 16:27:00 -0000 Message-ID: <002e01d5d075$d6c93800$845ba800$@franke.ms> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 78.46.86.77 X-SW-Source: 2020-01/txt/msg01357.txt.bz2 If running "make check-gcc" with -mcpu=m68040 you get an internal compiler error during the combine pass in expr.c since there are checks at lines 4107/4108 which seem to be not reasonable. It combines (insn 8 5 9 2 (parallel [ (set (reg:SI 41) (udiv:SI (reg/v:SI 38 [ x ]) (reg/v:SI 39 [ y ]))) (set (reg:SI 42) (umod:SI (reg/v:SI 38 [ x ]) (reg/v:SI 39 [ y ]))) ]) "../gcc/gcc/testsuite/gcc.c-torture/execute/20021120-3.c":14:3 493 {*divu} (expr_list:REG_UNUSED (reg:SI 42) (nil))) (insn 9 8 10 2 (set (mem:SI (pre_dec:SI (reg/f:SI 15 %sp)) [2 S4 A16]) (reg:SI 41)) "../gcc/gcc/testsuite/gcc.c-torture/execute/20021120-3.c":14:3 106 {*movsi_m68k2} (expr_list:REG_DEAD (reg:SI 41) (expr_list:REG_ARGS_SIZE (const_int 4 [0x4]) (nil)))) The combine pass creates a parallel insn with auto inc, which is resolved during reload to valid insns again. This patch removes these checks, since they aren't helpful. Stefan ======================== --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1,5 +1,5 @@ /* Convert tree expression to rtl instructions, for GNU compiler. - Copyright (C) 1988-2019 Free Software Foundation, Inc. + Copyright (C) 1988-2020 Free Software Foundation, Inc. This file is part of GCC. @@ -4103,10 +4103,6 @@ find_args_size_adjust (rtx_insn *insn) if (dest == stack_pointer_rtx) break; - /* We do not expect an auto-inc of the sp in the parallel. */ - gcc_checking_assert (mem_autoinc_base (dest) != stack_pointer_rtx); - gcc_checking_assert (mem_autoinc_base (SET_SRC (set)) - != stack_pointer_rtx); } if (i < 0) return 0;