Message ID | 20221004112849.27678-1-stefansf@linux.ibm.com |
---|---|
State | Committed |
Commit | 5fc4d3e1837ea4850aac6460f563913f1d3fc5b8 |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6FD863856DF8 for <patchwork@sourceware.org>; Tue, 4 Oct 2022 11:36:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FD863856DF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664883402; bh=lZdngbhUXru0nnqwF6rpCn0QY6YFkvVLCkApGAmkl6Y=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OvQF2ZHkO7SZL1/TkFkMHfnPi/oHsacm6UJConUCaIyScbXtaKP9XsTWeruNRxsaa nJsgCLJr+97i5FamfgdpPiDozFWBb2pXFppinz75JVaR/P62R2geJbhaMVIVDFhiJ2 DzU1rq/wepxV0BhKttJoQitknbk5fz/JStXduW3U= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id D80293858C74 for <gcc-patches@gcc.gnu.org>; Tue, 4 Oct 2022 11:36:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D80293858C74 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 294Ba6OE019311 for <gcc-patches@gcc.gnu.org>; Tue, 4 Oct 2022 11:36:10 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k0gwtn8r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Tue, 04 Oct 2022 11:36:09 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 294BMPPq028039 for <gcc-patches@gcc.gnu.org>; Tue, 4 Oct 2022 11:32:21 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma01fra.de.ibm.com with ESMTP id 3jxd68txhq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Tue, 04 Oct 2022 11:32:20 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 294BWlCd50528530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Oct 2022 11:32:47 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EE67A405C; Tue, 4 Oct 2022 11:32:17 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67D10A405B; Tue, 4 Oct 2022 11:32:17 +0000 (GMT) Received: from li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com (unknown [9.145.67.68]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 4 Oct 2022 11:32:17 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088] Date: Tue, 4 Oct 2022 13:28:50 +0200 Message-Id: <20221004112849.27678-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zinxFas59MJlBTOla0c0beWRVGn2vN7F X-Proofpoint-ORIG-GUID: zinxFas59MJlBTOla0c0beWRVGn2vN7F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-04_04,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=542 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210040075 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Stefan Schulze Frielinghaus via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
cselib: Skip BImode while keeping track of subvalue relations [PR107088]
|
|
Commit Message
Stefan Schulze Frielinghaus
Oct. 4, 2022, 11:28 a.m. UTC
For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode for which no wider mode exists so we end up with VOIDmode and fail. Fixed by adding a size guard so we effectively skip BImode. Bootstrap and regtest are currently running on x64. Assuming they pass ok for mainline? gcc/ChangeLog: PR rtl-optimization/107088 * cselib.cc (new_cselib_val): Skip BImode while keeping track of subvalue relations. --- gcc/cselib.cc | 1 + 1 file changed, 1 insertion(+)
Comments
On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote: > For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. > Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode > for which no wider mode exists so we end up with VOIDmode and fail. > Fixed by adding a size guard so we effectively skip BImode. > > Bootstrap and regtest are currently running on x64. Assuming they pass > ok for mainline? > > gcc/ChangeLog: > > PR rtl-optimization/107088 > * cselib.cc (new_cselib_val): Skip BImode while keeping track of > subvalue relations. OK. And FWIW, this fixes the various failures I saw in my tester due to the cselib patches. jeff
On Wed, Oct 05, 2022 at 08:48:13PM -0600, Jeff Law via Gcc-patches wrote: > > On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote: > > For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. > > Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode > > for which no wider mode exists so we end up with VOIDmode and fail. > > Fixed by adding a size guard so we effectively skip BImode. > > > > Bootstrap and regtest are currently running on x64. Assuming they pass > > ok for mainline? > > > > gcc/ChangeLog: > > > > PR rtl-optimization/107088 > > * cselib.cc (new_cselib_val): Skip BImode while keeping track of > > subvalue relations. > > OK. And FWIW, this fixes the various failures I saw in my tester due to the > cselib patches. Thanks for testing, too! Out of curiosity which target is your tester? I gave it a try on x64 and AArch64 for which bootstrap went fine and regtest showed no difference, and of course, for s390x regtest went for the better.
On 10/6/22 01:06, Stefan Schulze Frielinghaus wrote: > On Wed, Oct 05, 2022 at 08:48:13PM -0600, Jeff Law via Gcc-patches wrote: >> On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote: >>> For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. >>> Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode >>> for which no wider mode exists so we end up with VOIDmode and fail. >>> Fixed by adding a size guard so we effectively skip BImode. >>> >>> Bootstrap and regtest are currently running on x64. Assuming they pass >>> ok for mainline? >>> >>> gcc/ChangeLog: >>> >>> PR rtl-optimization/107088 >>> * cselib.cc (new_cselib_val): Skip BImode while keeping track of >>> subvalue relations. >> OK. And FWIW, this fixes the various failures I saw in my tester due to the >> cselib patches. > Thanks for testing, too! Out of curiosity which target is your tester? > I gave it a try on x64 and AArch64 for which bootstrap went fine and > regtest showed no difference, and of course, for s390x regtest went for > the better. It's got at least one representative from most of the targets supported by gcc. http://law-sandy.freeddns.org:8080 will get you to the jenkins instance. Jeff
diff --git a/gcc/cselib.cc b/gcc/cselib.cc index 9b582e5d3d6..2abc763a3f8 100644 --- a/gcc/cselib.cc +++ b/gcc/cselib.cc @@ -1571,6 +1571,7 @@ new_cselib_val (unsigned int hash, machine_mode mode, rtx x) scalar_int_mode int_mode; if (REG_P (x) && is_int_mode (mode, &int_mode) + && GET_MODE_SIZE (int_mode) > 1 && REG_VALUES (REGNO (x)) != NULL && (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn))) {