From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonicconh6001-vm2.mail.ssk.yahoo.co.jp (sonicconh6001-vm2.mail.ssk.yahoo.co.jp [182.22.37.11]) by sourceware.org (Postfix) with ESMTPS id 0B5C83856975 for ; Thu, 12 Jan 2023 04:26:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B5C83856975 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=yahoo.co.jp Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yahoo.co.jp X-YMail-OSG: 4MFaVi8VM1m.xV0otYNqx8smCrC38b18b1KwMi6YlYNMFo2OygG_zfW3jfY0RRi ZxiMUCiVBsG83SzqSS_.EooaUvN89JpHknuKaPPjqioEbLX7f9LZ_iUcQUtQaQ5QTzkS7g4XeyAA e3C2G7SVRB9i4OBes9wEmJRYP2MjOaO0lgAY.uKUKkH9TBJzDKJibTFGLD7qCf4vJG9oKnchjqnC MbVFP22XiEAPF_h2vps00tYkkbiPBqjGduYmRIMUYdqB.y3dCpPkEAkZurl7jD3xXrWiZCt1.hLm WU6TdrLa_3dZYsJmiOp78DGWbpdMhxCLfmAyNZhyQ5LSvGFuqfAD1FzkLOgNIzibudi2PmkuY0Yr UkpV2NjRGtFk9cYE50saUeaQpY0tsBsHeJo8NLEPNyHIy_Rv_lVFwO0anMNoNd264BpfMC1sDYGX tQ97QAQYrjJ5dKgUviMJjIdS_0tlK_JFfT7LBKBS6bKwaup7ThFnfW282zmAaWW7GhAlAzZY5KeJ PaKm4MlwK9XzXFEx4t3newBaVL_LGEvOp1vLoE1ziAtkB698FTW16S2WOxRj2li5En2HYM3xZfDf GYIRs6FjFsUt7QVlLIpycw4OTAPIWcl_IhpS3NP9gAs2xETecwRqKbukOJqCaKC4wgp5lTP7gKau 6_H9VSAuxLRGhMSLEm78D7GyEo2xQmlsaptqKllJBotd650oiBHTf4tyrUweUwZjfqnMr3K6ue2B Up7lf9_g5r5UWs5iagCdEW9qzcjLnHgD.RAX0aN8GaeWMBHumX.wtbrY8AlEasR9fPjvBE74TeeL o_IMPSj4FvSKblEmJnnpdHz4e8urZc3tO0nsdRbpLb94B5hQwJy_sUhAFCcrUIgGeV3yl7JDscX5 1eR8vPvM0Jv76DcYX0E4CQhKKYrwdE3lwWWbZZi7GK4nSEhX1L5abC7_iprIOpuBon6hXD9xQOzR kdjAwFE8- Received: from sonicgw.mail.yahoo.co.jp by sonicconh6001.mail.ssk.yahoo.co.jp with HTTP; Thu, 12 Jan 2023 04:26:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673497605; s=yj20110701; d=yahoo.co.jp; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type:Content-Transfer-Encoding:References; bh=dgAJJ2IWOmFDsbueVc83orSGguMHHrk+JbtR+1Plxs0=; b=lO67Gz9f8rmgc9vTQwl38gAf7DFH1uR/6s1bz/iTvXLzhVAG3rxKfxklrkymqujZ Dwumu1oxo0FMLXeQy67dJ8fpFofCW9MSyPHCklEKhysFzdbSo4NZRNNxNh1DZOJiYy6 cIQrvK4zYr/vDFQg5YRxqvtMi03KSzADHOYuvuKA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:Date:MIME-Version:Cc:From:Content-Type:Content-Transfer-Encoding:References; b=CA2pBgqOrDhDEGWD6yTuKumVwswzcGr0wIvCXnC1SMO/xE3kKfrgy98LzuqRaJF7 a01vkqVa5SDtDJ1ept6q3qf6d/gYMNfNPtW05dNwRQhMEbhE/hVysA1WqhNCtK33K93 6npWianzPkHDXMYwo2w0UV8Jeo4APuV5BW8IQAZg=; Received: by smtphe5006.mail.kks.ynwp.yahoo.co.jp (YJ Hermes SMTP Server) with ESMTPA ID 4af41384d4fe308683cd1350d1b18f61; Thu, 12 Jan 2023 13:26:44 +0900 (JST) Message-ID: Date: Thu, 12 Jan 2023 13:26:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: GCC Patches Cc: Max Filippov From: Takayuki 'January June' Suwa Subject: [PATCH 2/2] xtensa: Optimize ctzsi2 and ffssi2 a bit Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: X-Spam-Status: No, score=-12.4 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 autolearn=ham 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 saves one byte when the Code Density Option is enabled, gcc/ChangeLog: * config/xtensa/xtensa.md (ctzsi2, ffssi2): Rearrange the emitting codes. --- gcc/config/xtensa/xtensa.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index b4989832169..764da63f91c 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -477,8 +477,8 @@ emit_insn (gen_negsi2 (temp, operands[1])); emit_insn (gen_andsi3 (temp, temp, operands[1])); emit_insn (gen_clzsi2 (temp, temp)); - emit_insn (gen_negsi2 (temp, temp)); - emit_insn (gen_addsi3 (operands[0], temp, GEN_INT (31))); + emit_move_insn (operands[0], GEN_INT (31)); + emit_insn (gen_subsi3 (operands[0], operands[0], temp)); DONE; }) @@ -491,8 +491,8 @@ emit_insn (gen_negsi2 (temp, operands[1])); emit_insn (gen_andsi3 (temp, temp, operands[1])); emit_insn (gen_clzsi2 (temp, temp)); - emit_insn (gen_negsi2 (temp, temp)); - emit_insn (gen_addsi3 (operands[0], temp, GEN_INT (32))); + emit_move_insn (operands[0], GEN_INT (32)); + emit_insn (gen_subsi3 (operands[0], operands[0], temp)); DONE; }) -- 2.30.2