From patchwork Mon May 8 18:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 91219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2334794vqo; Mon, 8 May 2023 11:05:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6lwt8vbXKijvBBni2KHnlHr9TzewzgYFwVq75QxuLIolr2l70/Y0YO9eY8h465vqFWX8Fp X-Received: by 2002:a17:907:96a9:b0:958:720:49bc with SMTP id hd41-20020a17090796a900b00958072049bcmr10397626ejc.10.1683569117710; Mon, 08 May 2023 11:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683569117; cv=none; d=google.com; s=arc-20160816; b=gZ93x9jQg8Q68VfADNj6VMAyubaT6J4oIZXMhRnI/UG3ZWpWmy9YSP1K2OYmqxMHPJ zwK7JeHZqlclxPosUlET3d7XkZANY/MtZrsuCAedQ97EFFj/Dl+f+s8xjinTsEDjA7P8 /K/XwTV+rCozCQDCtXqqb6GZUgBgm59Q2lWEJzkM7yaUsSTRg3BxxkyFjKGPHgwZA7Hg U9wPWRVVUj3eq29nBoy7rxDk/vF+B+xyrD4gugtbJ4HbkNG0hHGm9b4GbLVc1aKb0AZa 6PU1toyqggzgu6KDdidv1kff5+gFIznzmU3KcYwGtypMfgJmuwnrpDB6Yv+8/PsmxP8v FEBA== 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=dE+35iNXyrG6ASSzPuJEOoeJwX07QDL6V8bVwk+yFKk=; b=uo+o4SGrkqdneOrUQh/aO2APvn4Dl86SesAxIMveozsgoVwFAIHgx5ONRY/cBllc2h M/MA6/P5SkKHnrXLRae62HgzRjnkm8JuAsm4olqoAGmBteqoE4qLMCOIIiwpzQrB3w6u +/JjvJ50Q3Jqeztvs5qg4gD+CK3++fBk00QEpnGC0nUYp04REBTL8p2Ko51ldhWihnzp 4V+kEheJPQpNZz6e5ZXUInLnK3ApAwVDzlZua28Oy/NMqZGSLZbr8pPkGzq03Oj84Zke gGEz5O0RUwuWVsY+A8XJh2TRWh67anG27ianvrAtF+RGtdz/CHQqjZsOcEnLOlaCgFfb 8L2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=u34aBvZE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gy11-20020a170906f24b00b0094f60584974si328425ejb.244.2023.05.08.11.05.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 11:05:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=u34aBvZE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 CFB113857717 for ; Mon, 8 May 2023 18:05:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFB113857717 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683569115; bh=dE+35iNXyrG6ASSzPuJEOoeJwX07QDL6V8bVwk+yFKk=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=u34aBvZE9byIfWKbtjHiBDCHTNQJjt41PBzDrrDmA0mEkVMOi39juKna1928GBseU mTr2R1SzjK6vAnBlu0vTKIPcaqKzHQwDOcOkrw17kyr8976ol/uNew1UiQCKSrNGF2 wiiIy/Tsg3BG/S0z+hNg34e8JhvKclBsAcD6tJug= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id 017D73858D28 for ; Mon, 8 May 2023 18:04:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 017D73858D28 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 348FrhHE025958 for ; Mon, 8 May 2023 11:04:28 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qeuyxjh1e-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 08 May 2023 11:04:28 -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; Mon, 8 May 2023 11:04:26 -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; Mon, 8 May 2023 11:04:27 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id 7C7593F7054; Mon, 8 May 2023 11:04:26 -0700 (PDT) To: CC: Andrew Pinski Subject: [COMMITTED] Fix pr81192.c for int16 targets Date: Mon, 8 May 2023 11:04:08 -0700 Message-ID: <20230508180408.1218395-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-GUID: fpj-sZEzfyXGpKdhmlxXIkSlBe9oUzbh X-Proofpoint-ORIG-GUID: fpj-sZEzfyXGpKdhmlxXIkSlBe9oUzbh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-08_13,2023-05-05_01,2023-02-09_01 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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?1765350170728261653?= X-GMAIL-MSGID: =?utf-8?q?1765350170728261653?= I had missed when converting this testcase to Gimple that there was a define for int/unsigned type specifically to get an INT32 type. This means when using a literal integer constant you need to use the `_Literal (type)` to form the types correctly on the constants. This fixes the issue and has been both tested on xstormy16-elf and x86_64-linux-gnu. Committed as obvious. gcc/testsuite/ChangeLog: PR testsuite/109776 * gcc.dg/pr81192.c: Fix integer constants for int16 targets. --- gcc/testsuite/gcc.dg/pr81192.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr81192.c b/gcc/testsuite/gcc.dg/pr81192.c index f6d201ee71a..c46ac18fd9a 100644 --- a/gcc/testsuite/gcc.dg/pr81192.c +++ b/gcc/testsuite/gcc.dg/pr81192.c @@ -22,21 +22,21 @@ void __GIMPLE(ssa, startwith("pre")) fn2 () goto __BB7; __BB(3): - if (j_6(D) != 2147483647) + if (j_6(D) != _Literal (int)2147483647) goto __BB4; else goto __BB5; __BB(4): - iftmp2_8 = j_6(D) + 1; + iftmp2_8 = j_6(D) + _Literal (int)1; goto __BB5; __BB(5): - b_lsm6_10 = 2147483647; + b_lsm6_10 = _Literal (int)2147483647; goto __BB6; __BB(6): - if (c0_1 != 0) + if (c0_1 != _Literal (int) 0) goto __BB3; else goto __BB8;