From patchwork Tue Jan 21 16:14:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Franke X-Patchwork-Id: 1226644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-517912-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=franke.ms Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=Bv6e5tzw; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 482DCK0pyxz9sP6 for ; Wed, 22 Jan 2020 03:15:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=XlioMWa+WRztcqJn BPNreujpIu3CdtchCuoTgJtNy7qzfa5xOSbKSw09R7X62eAu6xREsjnbU3SJZHWf 40vxuPP/xJIWXOhX6fh+3nUWW0O11YTbqV+GCWsAkcU1ak17HBPtW2NQXPzTK4qh YQi1y0Q2dGTmzK+Wsn70TTiuWKw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=AKZrycJ7GD+InZeULAEoh/ r8EIY=; b=Bv6e5tzwEnZMujJVutWGYo8PGoVfP+CfycePurnoj9f5zDLzcgn+LT yMStS8PwH3+N47/ABc2F6ec/Hez0ZJLSz1gc/G4litBvEjZNOtfatSZv0IkxUBP2 IQmTHUweAmIB64egRsh35UqFkfrZfMtozg1fFOzK806sKPLJj9jdw= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 17:14:20 +0100 Message-ID: <002e01d5d075$d6c93800$845ba800$@franke.ms> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 78.46.86.77 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 ======================== return 0; --- 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)