From patchwork Sat Jul 1 17:19:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takayuki 'January June' Suwa X-Patchwork-Id: 115055 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp11159479vqr; Sat, 1 Jul 2023 10:22:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73LfY0ZT0OnwcYfRKLHjognoZUf6xhUxqBNfu1y+idht0Serrfvc21RvbuVqavdKaXWoDa X-Received: by 2002:a17:906:5e4d:b0:988:6491:98db with SMTP id b13-20020a1709065e4d00b00988649198dbmr3887499eju.17.1688232140970; Sat, 01 Jul 2023 10:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688232140; cv=none; d=google.com; s=arc-20160816; b=yiwwFyD7Os8Xl2rIyFA8Zqfx4DuvMerVINNu1rjeh95XvNaDf9kJ/49j5yz8Bq3hte ay7cZXzEDtoczsnvHUe9UbMaamGH9dwOa4ZysDDWmE80fsYus1uVfJikw2YWr1dxHvbF /ZnBR+AQ4BFGw/bYa3YpojmwrQpgHLmzupKSwRw/nhijk/CLbAJdf2MaOdtdE1PyuRQT TX3REdpz5fkGMwo2zT/ydEJfKhbMsULUBAFeqq4t4wTxQvVTeM3fnxTvXCaJ10EUQn0V rozJalcMgk12begGf92Ul5hz+nOgrfP2V3YRkSDUZJgqLPZXd1JcglzkqnZR/BowCona 8TYQ== 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:references :content-transfer-encoding:subject:cc:to:user-agent:mime-version :date:message-id:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=WJ5ae3/ow1fvXRMnwY3w/vNHZiLtuC9Oai+R2Enc6Xs=; fh=+wxo5kSZvN52p1ooJTAJy9Qs8TLl6DV0i/eYMLN37Pc=; b=jIiciCm2+RGhGlNRnwEUVoiYLTcTKaWZbwWXpsbQ/kMzGh51PNWMPvbmoCatZQxMV4 0RZWGGwbWOR4pSEvxMuyNrSFNH7XKNKt/oHnsEz7J6U80FEwG178ITohP7DTplXjfTVT h5lNQvkKVBiKamA0YKTirIqCRO0ti5RE6zdLg6TfxxXdd13CJxKCQMowOEqN2a6nIMMy 3ugIjMmMsIx/FSq7kbWMhRBOz9S6PDfbA/eltJp8ZwWTksB/LGpoQjWDBJgIZiZT6Aob S/U9L8Fznksbrlpz8ARznaUFK4Ya904XWH/x2VGriJ324WWgH6amgYzYhL5xfniPIU7o b+8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="h5/C8anf"; 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 e4-20020a1709062c0400b0099248468c56si1023242ejh.377.2023.07.01.10.22.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 10:22:20 -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="h5/C8anf"; 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 1F1C53858022 for ; Sat, 1 Jul 2023 17:22:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F1C53858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688232128; bh=WJ5ae3/ow1fvXRMnwY3w/vNHZiLtuC9Oai+R2Enc6Xs=; h=Date:To:Cc:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=h5/C8anfu2LHPPLN0Yr1gQo35Ip8yJn8RbtJWHnEjPoW35T4HL6yfhWTb1GlfMY7/ ym+xQ88Q8ev+fjY2GCydU4wgDCDcBor9kJSvnM1GXc1EEuM9J3RJp4yR+pmCDm5Tg5 yjCOyPm0ZON7cWRSvPeZMaTLk/70bB+VzizzmqdE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from omggw0019.mail.otm.yahoo.co.jp (omggw0019.mail.otm.yahoo.co.jp [182.22.18.33]) by sourceware.org (Postfix) with ESMTPS id 0CBDD3858D35 for ; Sat, 1 Jul 2023 17:21:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CBDD3858D35 X-YMail-OSG: t_jxHlMVM1naITnEHABe1fhDLu7kd4PTkg7wQmKO6VxLk8Vm0Ub_tBbXiZeEaon 44aXAG8wXUSHXmBbldbcxKfrzyIQA1yA6nPN7ngoGKyvy_vramC6VdxdSlRC264X0m_wEtNeyI5X E9OLk9tJYJc9YZwb8DLG_i1Fe9zzPCrchP90qowdHZF4.0f1H_HLxOI9_K3r0Jxk9WuxAGLQJ1ym e91ftKsOumjKzCOwxZKzOd0INw3CcuYQwTHJu3twTk7sMWl0TTMPxtFrKzBNqJGTYDAIXrkklMfk SoJBPjwSuxq8w.y5Tt9ieHuoB0Y64gLdnsZtFrIK4Ol3A5s0FxneEtmMnbwZWoixwMG.JyhkT23P 1f0KG21Gj7UodJ5kOGX3wcXKf_AJaQ.e63wdfGowKITroqIni0VPb82lrsBrqdBn8p.1A7wqG8ji eBnG5KHmyT604ixvmImG0IcaTIovRqLxPoWPaaszADxyndBhWN8M4wTaDN8wibcbGUoSpOBDV0fD a5xvpl7jGJk3GDxiP0T4grFFj92op.jOv6vbQfz7sFqgO4Bu1qgoU.u8NKLbVyndBNMC_AlTPFOF oQ7.7x3daRawILj_S54v.ApZ3J4Do7zZloqRmz4VZxMEW7r2DXkVAMpOsV._U0VQ9vc8cIuI3GKD VWZG0QewcKikokWI6kZHs9d1j0zLgHH96WKH0rL5zuxl5_ZXS1dHF5ApK6FXaXUf29MzhVj71qAT ww4IwH2ExT4nq1cwvnKDvDdkG1iInfLm1Yfh8G5pbPTKKKt7F9tP.tnS2OwSRltn7ArOkkInySDH C9jyEOnYmetc2Pyj.uNQhSCOEdqfCiAuifwb.fICO2dyziZ.hpjIDQ9fP2dRFLSolfbAhQGKDyWQ oxeoDNwyqTHGFZsipJFXUOXmUR9Q7P3ZHPgb9wUIApUkvBRscuQEgGWzZ943ETGOHL0i5VWiDd0V s..kVLInwgUMWXsDVR3RmJQF7ePezqbHSaC9Z4EHWcTbEaGFVEsEwY1EDHEOK0T1X Received: from sonicgw.mail.yahoo.co.jp by sonicconh6002.mail.ssk.yahoo.co.jp with HTTP; Sat, 1 Jul 2023 17:21:14 +0000 Received: by smtphe6006.mail.ssk.ynwp.yahoo.co.jp (YJ Hermes SMTP Server) with ESMTPA ID 1e89fc7ca61ba3ec035ca42e61a47f72; Sun, 02 Jul 2023 02:21:11 +0900 (JST) Message-ID: <6827e2cd-4966-21be-4861-b99bc0aec8ca@yahoo.co.jp> Date: Sun, 2 Jul 2023 02:19:03 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: GCC Patches Cc: Max Filippov Subject: [PATCH 1/2] xtensa: Fix missing mode warning in "*eqne_INT_MIN" References: <6827e2cd-4966-21be-4861-b99bc0aec8ca.ref@yahoo.co.jp> X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: Takayuki 'January June' Suwa via Gcc-patches From: Takayuki 'January June' Suwa Reply-To: Takayuki 'January June' Suwa 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?1770239705798214159?= X-GMAIL-MSGID: =?utf-8?q?1770239705798214159?= gcc/ChangeLog: * config/xtensa/xtensa.md (*eqne_INT_MIN): Add missing ":SI" to the match_operator. --- gcc/config/xtensa/xtensa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index 4b4ab3f5f37..b1af08eba8a 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -3191,7 +3191,7 @@ (define_insn_and_split "*eqne_INT_MIN" [(set (match_operand:SI 0 "register_operand" "=a") - (match_operator 2 "boolean_operator" + (match_operator:SI 2 "boolean_operator" [(match_operand:SI 1 "register_operand" "r") (const_int -2147483648)]))] "TARGET_ABS" From patchwork Sat Jul 1 17:20:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takayuki 'January June' Suwa X-Patchwork-Id: 115056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp11159485vqr; Sat, 1 Jul 2023 10:22:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFEFU5sJQ13wCpJAtZ6xQXXYf1Ih4R3XCdNoNFRK6CVE2YyYBFSBcfcyoioDPkyBCGY2dp8 X-Received: by 2002:a17:906:fa89:b0:992:48b9:84ef with SMTP id lt9-20020a170906fa8900b0099248b984efmr4414735ejb.29.1688232141911; Sat, 01 Jul 2023 10:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688232141; cv=none; d=google.com; s=arc-20160816; b=KV4WRV5ooRbO4wxboMnEm/umIuYYijTHSedcQdEbWHd1noP1E5B7sSu4u2mIT5VSq6 o4HGhs617g45bs/W9bsrV3avDI/8F6ouvSeFgqD2YYkQDB9PbJ6AfpKFGY3riJfP3uD+ Ug9RhdmmrvbB15jiwVz6q+6vjHN61jVtn2gZWLo7RRHdRGW7AtnphVMB5X0AoiDa0NAK 7t9m5A38suMWNMnhbgzwsZ2+jCvDmfPk9mNKjTTvt5+taJTmMMsS3x66ywF30gVh9MYN HP7YGhXDiFpreFAI5GHicbKOG0dMib8kUpd8e4Y647jPs3qBIbu5OJQKXcSEuH9aLsbo QJCw== 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:references :content-transfer-encoding:subject:cc:to:user-agent:mime-version :date:message-id:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=AneKbtzJcO6N4sr7WUjgPd0cSDk+pz+lAFVbqSKlMvY=; fh=+wxo5kSZvN52p1ooJTAJy9Qs8TLl6DV0i/eYMLN37Pc=; b=vZblAUEnsiyCVjHOQ46jDCuY8B5wbxnFsHPFfmu6musBvWAhw5JZh3FOXwHwytB7z8 a20gCE9ib4gUCqAAyF2aaXGucr2dyDLCqBFREv4NvmPx4sRmhvoSmo79N1AJkif2kekf BJ4jlUxlq42+tObQTdLajicarf9cTprGcVNgukS8fJzjs3+jfj/P7luzi04ke+K61TvC QMafhWxWEEPe9nI3Uoh/W7zDpDXPX4dx4DxEe6yql00vGLrQhIg3KPXayH7vfJj5Pv5E 21GHZP1yga+pILzW3dQ1Gl1geZy0uFblG1noU4N3TNRf3s7q+uY4tr9FjW2tgemnvQeC mHPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=MFzQdROg; 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 s20-20020a170906061400b009927d850155si4819049ejb.892.2023.07.01.10.22.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 10:22:21 -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=MFzQdROg; 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 9F886385772C for ; Sat, 1 Jul 2023 17:22:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F886385772C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688232128; bh=AneKbtzJcO6N4sr7WUjgPd0cSDk+pz+lAFVbqSKlMvY=; h=Date:To:Cc:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MFzQdROg4zjvy2yhheXE4Y6TUNKOnJND3737ISKy5+iBlRBDwugBj0aqrHqumDB96 NZ8uU8AjsJ+mI8La9Ojfk8JJ0EZ6NoQs3764UjnQ33LMp+W7KH07qkRUtZAMA7uZ4D okuGQTl5ZHOyTtwJdP4IhHcpHlgjcQxcF/pV9sVM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from omggw0021.mail.otm.yahoo.co.jp (omggw0021.mail.otm.yahoo.co.jp [182.22.18.37]) by sourceware.org (Postfix) with ESMTPS id 5C26B3858D39 for ; Sat, 1 Jul 2023 17:21:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C26B3858D39 X-YMail-OSG: IUtn1.oVM1nkuot3CGXVd2V.UpnzaFPj3fGmPsqRD5fMJv2U03dqJefqG_GHzCe EwyGjAdV9WbA4L2baKusvsruCAH_vP.6g2RB0Oz.OOcFJwJ60VheeG4bpp1TSDUp3D0.ccAnoTfI CtH99brzQHXxCi4g5eI9dC69GVBYzLDYe2L_UCoA3AVbBJIYxsBxfdh9YqTkIKNHsDU2aJrcexLD O7KCzCv5zOAmrYfdm4id9hlCtlrCeo2rBzMCyEDOQoV.TIHFUUMZsNfiOfglEYUvCoKn4oDVbf_x JBztdCN5gxmsy6aw_KsFauJNO6t4CD7ZSmH7q08Wn22faMGNcRFNSRYqX10fvwYMSycT7PhrqZGJ vXSOExh.C1o3H.QWZrSEjE0wU9WI48PouQG1nhECEyegROZqd.VNXZRgjkHttRaJwSiTjtdOe4S. Yr3nclBWOuL8b8jADhjDj2sEp24fd1C6Up3RL7rO53eGkkfKY.GU1GUnEkvFbTiLT5kXrjOgqrLl lPSHuDItSlhaCSMCuym9O4Cy_pVq6p_PXeDBrL9Grqa.DGKe0qVpAKwpSwzOQg1TTLrc5YDlpamY 456hSnLi3rpJBZUO1A48XXWnqtjCVZOwrJRawBXMSof34bBjV3uR5OkkCJSuAUoHD48bn5rzde6l 4BING4OUxPPWTHh6Ihv_xGGO.3oXbCT513rL6AsO67JwSlUGEgik1TCuwKPp8womFFpzSMiTS1_B _ZV1_hymnEfL5rn_BOZdvEYI891l3J7CZ3U9E4wK5YpS0maIHhVKDoCdbpua3M1e6dEGNjs0HOel Mlg8E79uHM5ece1J4.q7uS9d0aCxc76r5ekt96eJwd0KvNdzSGopeknZ9QdSDQi1QwtccMAQRqtD SVcDQL4a.AHXzOmpa43v_bOewMUgC3ZPbhyaXbiflmvLe9hV8c91_5F5YpI1IysQ4xvA3Ej3JGqr 17C6CQqTyxVZjRaca.BmgCRemjaqI3QUhUR7GSfq_feonPu54q3XTj5viOLtaKm8AFA-- Received: from sonicgw.mail.yahoo.co.jp by sonicconh6003.mail.ssk.yahoo.co.jp with HTTP; Sat, 1 Jul 2023 17:21:18 +0000 Received: by smtphe6005.mail.ssk.ynwp.yahoo.co.jp (YJ Hermes SMTP Server) with ESMTPA ID ed106e3c87e8a8e38d4dfe23d04cb3ae; Sun, 02 Jul 2023 02:21:13 +0900 (JST) Message-ID: Date: Sun, 2 Jul 2023 02:20:08 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: GCC Patches Cc: Max Filippov Subject: [PATCH 2/2] xtensa: The use of CLAMPS instruction also requires TARGET_MINMAX, as well as TARGET_CLAMPS References: X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: Takayuki 'January June' Suwa via Gcc-patches From: Takayuki 'January June' Suwa Reply-To: Takayuki 'January June' Suwa 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?1770239706690517701?= X-GMAIL-MSGID: =?utf-8?q?1770239706690517701?= Because both smin and smax requiring TARGET_MINMAX are essential to the RTL representation. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_match_CLAMPS_imms_p): Simplify. * config/xtensa/xtensa.md (*xtensa_clamps): Add TARGET_MINMAX to the condition. --- gcc/config/xtensa/xtensa.cc | 7 ++----- gcc/config/xtensa/xtensa.md | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index dd35e63c094..3298d53493c 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -2649,11 +2649,8 @@ xtensa_emit_add_imm (rtx dst, rtx src, HOST_WIDE_INT imm, rtx scratch, bool xtensa_match_CLAMPS_imms_p (rtx cst_max, rtx cst_min) { - int max, min; - - return IN_RANGE (max = exact_log2 (-INTVAL (cst_max)), 7, 22) - && IN_RANGE (min = exact_log2 (INTVAL (cst_min) + 1), 7, 22) - && max == min; + return IN_RANGE (exact_log2 (-INTVAL (cst_max)), 7, 22) + && (INTVAL (cst_max) + INTVAL (cst_min)) == -1; } diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index b1af08eba8a..664424f1239 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -522,7 +522,7 @@ (smax:SI (smin:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) (match_operand:SI 3 "const_int_operand" "i")))] - "TARGET_CLAMPS + "TARGET_MINMAX && TARGET_CLAMPS && xtensa_match_CLAMPS_imms_p (operands[3], operands[2])" "#" "&& 1" @@ -540,7 +540,7 @@ (smin:SI (smax:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "const_int_operand" "i")) (match_operand:SI 3 "const_int_operand" "i")))] - "TARGET_CLAMPS + "TARGET_MINMAX && TARGET_CLAMPS && xtensa_match_CLAMPS_imms_p (operands[2], operands[3])" { static char result[64];