From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id 3DFFD3858C98 for ; Sat, 2 Dec 2023 06:37:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DFFD3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3DFFD3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701499063; cv=none; b=bqlI/2T4EXpQPBKpfyA3MeDdY4IFp6FaFO4/RqjB2TcKSBwfHLlSJE94jqBjYjX+gYvP/GNl3XXzZw8h9KQQqlVdikyIxcgS3oAFzWvHkRY18InOZl7Ms+sTVD3g5snXchFjMerT1ZlzjOrNsK5wRTSTiWh+JrD+/ADBin95mpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701499063; c=relaxed/simple; bh=3iZkfonYE2l74jgNW7my/Ee7m/h70hWQPjtiHE9+atU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RfSWZSk9lSqoxMGIPghPojRPbY1gprhfEYF6ChJGlYUPh70HN3zkaeakWCiIcdVYwjmICT/4D4hd/M7XkC9fLSxWkdm5asubYN4roGyaxN69jxJPKU+qgw6oL//MIB01F66WPTsKBsZSJ1WtivtITeWuZ4KI/KdbjNGXf14zqZw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B26bfF7022871 for ; Sat, 2 Dec 2023 06:37:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=+wBGK3VRkGLAFYAtJQUjWTLiEvMZyiChX1C8nY92aMA=; b=JofjwrpSgCQYBASWx+Rimr0C/gZXaKPkXBDcANdyy/IOLQ7DsztZvrMVbVwW2EQddAK1 jot4HWUQWW6GXl2zO5/pNRcZSCV22DLELAoLtxbsH9hEh+jm7luZgr/7vHAd6RfkECLC fwCq610dnbOX1TFdqX4XNzNQyhWWdDOFGP0IcKqqdukZBVWgnpCL/3t1yFtCm4+ZPSNZ 1K2gyO/1JpK2LqgACFzfvOkv51HVUKJqGh3eBf+xp2gOw/pc2XCf61RHPkEN2OGAU245 RCSW7zmL8eMUXhpK94ZhEpAnzo1VCWfruG3Ep38MimPtsJt75kw/zJWMOuOUerrFSt+w cQ== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uqukg09fk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 02 Dec 2023 06:37:41 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B26beEB001607 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 2 Dec 2023 06:37:40 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 1 Dec 2023 22:37:40 -0800 From: Andrew Pinski To: Subject: [PATCH 0/3] Fix PR 111972 Date: Fri, 1 Dec 2023 22:37:22 -0800 Message-ID: <20231202063725.3405094-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: XPswjfPaaOnf9SegJaiKju9qSPBqlGwi X-Proofpoint-ORIG-GUID: XPswjfPaaOnf9SegJaiKju9qSPBqlGwi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-02_04,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 mlxlogscore=243 priorityscore=1501 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312020047 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This patch set fixes PR 111972 and the fallout from it. The first patch is a fix to zero_one_valued_p's convert pattern which I hit while running the testsuite with the last patch. The second patch is a fix for -fanalyzer which I had implemented with a different version of the 3rd patch while I was working at Marvell. And the 3rd patch fixes the issue by having the following as canonical forms: * `a ^ 1` is the canonical form of `(convert_back)(zero_one == 0)` (and `(convert_back)(zero_one != 1)`). * `(convert)a` is the canonical form of `(convert)(zero_one != 0)` (and `(convert)(zero_one == 1)`). Signed-off-by: Andrew Pinski Andrew Pinski (3): MATCH: Fix zero_one_valued_p's convert pattern Remove check of unsigned_char in maybe_undo_optimize_bit_field_compare. MATCH: (convert)(zero_one !=/== 0/1) for outer type and zero_one type are the same gcc/analyzer/region-model-manager.cc | 3 -- gcc/match.pd | 24 +++++++++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr110637-1.c | 10 +++++++ gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c | 13 +++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr110637-3.c | 14 +++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr111972-1.c | 34 ++++++++++++++++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr69270.c | 4 +-- gcc/testsuite/gcc.target/i386/pr110790-2.c | 16 ++++++++-- 8 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-3.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr111972-1.c -- 2.34.1