From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B0FFF3840C3B; Wed, 24 Jun 2020 02:12:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0FFF3840C3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592964762; bh=HM6A62WvvpBtluvqtS400cV+IMkeJjltiMss5xBTllg=; h=From:To:Subject:Date:From; b=veWzs+Ug9HNzAkxhPJu8w3zfMBXA43Vk/3PiA1pTuU96hdfrC1/mJyq79/S7bzGc1 NKWisAG/uPq2XaFKXnLrQp9eiKkgpcJgIrbcMuzY97Yb8AzKCZRT8KHzYoRdsjpbjv qaAi0DVxLShuN391hDGn9sXYx3hmP6LJL8NpAqDM= From: "zhoukaipeng3 at huawei dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/95854] New: ICE in find_bswap_or_nop_1 of pass store-merging Date: Wed, 24 Jun 2020 02:12:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhoukaipeng3 at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 02:12:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95854 Bug ID: 95854 Summary: ICE in find_bswap_or_nop_1 of pass store-merging Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhoukaipeng3 at huawei dot com Target Milestone: --- ICE log: during GIMPLE pass: store-merging pr87132.c: In function =E2=80=98main=E2=80=99: pr87132.c:5:5: internal compiler error: in tree_to_uhwi, at tree.c:7332 5 | int main() | ^~~~ 0xfc2fcf tree_to_uhwi(tree_node const*) ../.././gcc/tree.c:7332 0xfc2fcf tree_to_uhwi(tree_node const*) ../.././gcc/tree.c:7330 0x169420b find_bswap_or_nop_1 ../.././gcc/gimple-ssa-store-merging.c:602 0x1696c1b find_bswap_or_nop_1 ../.././gcc/gimple-ssa-store-merging.c:589 0x1696c1b process_store ../.././gcc/gimple-ssa-store-merging.c:4773 0x1696c1b execute ../.././gcc/gimple-ssa-store-merging.c:4996 Command: gcc -S -march=3Darmv8.5-a+sve2 -fno-vect-cost-model -fno-tree-scev= -cprop -O3 -ftracer pr87132.c GCC version: gcc version 11.0.0 20200618 (experimental) (GCC) The problem occurs in find_bswap_or_nop_1. The stmt is "_27 =3D BIT_FIELD_REF ".=20 So "tree_to_uhwi (TREE_OPERAND (rhs1, 2))" failed. I plan to add a judgement before to make sure both TREE_OPERAND (rhs1, 1) a= nd TREE_OPERAND (rhs1, 2) are INTEGER_CST.=