From patchwork Wed Jun 28 07:22:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 113686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8732806vqr; Wed, 28 Jun 2023 00:24:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rnEURuhWRgqooJIP6RCEu3/rt2CB8ZjEsq0KHwUTQ4J9NKM8+WL0Ra2aH8IgL2Y+z0nAP X-Received: by 2002:a2e:b0d9:0:b0:2b6:a6eb:693e with SMTP id g25-20020a2eb0d9000000b002b6a6eb693emr4361123ljl.32.1687937068568; Wed, 28 Jun 2023 00:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687937068; cv=none; d=google.com; s=arc-20160816; b=uWuFujp/AdLmqAdYqIhVQNgU/c3TRIL2OkFFFKkcjsSNiJXuFSzobapGIsulVc9/7W w95QgkJGOnI82ENIad+yjmkDsHeVycO/B8nO1iTN5IuuYsugzQNuD1Ddy+SQnzRTb+eP qz+attWaTIs+u9uIlcTZFImVbH5t9B22qn3fgyxl9AU5vFTr/CyCQnkaTRVN5R/v7/sP RYOgJwgNX9+oEiu8RJ/bL8FvEGZdxJeJDczewH1CBbM+WJ8iXD2rkv9L5cGwwl+hmGoU 4FHRC5yNZhmv5McJluhVygrgB4MuEdnqA/WWsEaGSs91GWvqx+VSP6hIhFjZNw8YtKBt 3GHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=NIIkAZpUdxWewzcAaEnVfuztzAfPmnhXcpvykEc4OzU=; fh=XbcmRug6/SzczusyoNU1I7Lu5oY0AN2u0mWDzKoxdSs=; b=nIJVwmKIGHkAtsCWk5UXGpGwREKRmq/pG2VRdZDvTY2AIK0Jm2gBqxRkTrdXzJuaxn roP359Xb32bizXdVjLuXLyb/OBde1bv0TmxaiENA8krozftn3I+GdLqUrdDFb2/3ohdx nTa9JvhHO+llXNNprPaVdukrhLSeG0ILDh1nvKhq1Hut/icvTsj2awQ4Ai/zrnXorIag sJwJHE+toeGxD40Oowjc3CExe/YSMhKFDsKiEqWa4B5rnRfQyP1fbDbqWLOzbMLm5i6i VgXKt0EbVuK6YDwvZsHB2fqHozaKZP/o78kquwzy72fDr5EvFCCQrWs/Y/DMlGzqe0Ep kVzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jlKy2l9i; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a1-20020a50ff01000000b0051a4adabcb5si4999607edu.618.2023.06.28.00.24.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 00:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jlKy2l9i; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BA213858C1F for ; Wed, 28 Jun 2023 07:24:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BA213858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687937067; bh=NIIkAZpUdxWewzcAaEnVfuztzAfPmnhXcpvykEc4OzU=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=jlKy2l9i/KOuY+H39Ipw6ZLyhkCfryvxLk96sNXMFHgQmYlgGdUR1CiQNLu07KY53 +tbK4KVngPqdfEY7jHJyas5fj6ps9VN5a0X0gJWIRqUQyzymGgHcwwAORIlkiC/+Uf VVDgOPq+dzs36V74a1EcLBmkAxIPlIPbEv9bdvjE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id 5E6933858D1E for ; Wed, 28 Jun 2023 07:23:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E6933858D1E Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35S00e0F028967 for ; Wed, 28 Jun 2023 00:23:44 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3re00k3s35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 28 Jun 2023 00:23:44 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 28 Jun 2023 00:23:42 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 28 Jun 2023 00:23:42 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id DAA9C3F7062; Wed, 28 Jun 2023 00:23:39 -0700 (PDT) To: CC: Andrew Pinski Subject: [COMMITTED] Add testcase for PR 110444 Date: Wed, 28 Jun 2023 00:22:48 -0700 Message-ID: <20230628072247.109808-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-GUID: klzCJodb41C0CMu2wkk3zl8LNwL2Mrsz X-Proofpoint-ORIG-GUID: klzCJodb41C0CMu2wkk3zl8LNwL2Mrsz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-28_04,2023-06-27_01,2023-05-22_02 X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Pinski via Gcc-patches From: Andrew Pinski Reply-To: Andrew Pinski Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769930299094265835?= X-GMAIL-MSGID: =?utf-8?q?1769930299094265835?= This testcase was fixed after r14-2135-gd915762ea9043da85 and there was no testcase for it before so adding one is a good thing. Committed as obvious after testing the testcase to make sure it works. gcc/testsuite/ChangeLog: PR tree-optimization/110444 * gcc.c-torture/compile/pr110444-1.c: New test. --- gcc/testsuite/gcc.c-torture/compile/pr110444-1.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr110444-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c b/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c new file mode 100644 index 00000000000..1cdb400f76f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr110444-1.c @@ -0,0 +1,11 @@ +/* This used to ICE after SLP during match-and-simplify + as real_can_shorten_arithmetic was called with the vector + mode. */ +void f(float *a, float *b, float *c, int size) +{ + float t[2]; + t[0] = b[0] - (float)__builtin_pow(c[0], 2); + t[1] = b[1] - (float)__builtin_pow(c[1], 2); + a[0] = t[0]; + a[1] = t[1]; +}