From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7856) id AAA333858C30; Wed, 18 Oct 2023 08:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAA333858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697618370; bh=is1i4VGistS0SVPTNi4ZjWO1SpodYSJx1v90JgWWzqE=; h=From:To:Subject:Date:From; b=GfsEAFou/LcScMrsI06fQIs332upNAymJ/CR63/xhPCFKUNehQgkOXTBeZXpRDcYe JQvkRzEo1w95TxvvXVPejAgv8RVufODqzlmYFi/tWAkee0x6UZQ00PaXRVjRK5kCAK 38YcBf112URRfI8bbwaR6P5+aEjiVleLHEe3N8CU= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Xi Ruoyao To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4712] LoongArch: Use fcmp.caf.s instead of movgr2cf for zeroing a fcc X-Act-Checkin: gcc X-Git-Author: Xi Ruoyao X-Git-Refname: refs/heads/master X-Git-Oldrev: b0372ef12f6f7f863606b0d2858d049b18a4cfda X-Git-Newrev: b588dcb77e96d77777eb5647cba9e8f454e314dc Message-Id: <20231018083930.AAA333858C30@sourceware.org> Date: Wed, 18 Oct 2023 08:39:30 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b588dcb77e96d77777eb5647cba9e8f454e314dc commit r14-4712-gb588dcb77e96d77777eb5647cba9e8f454e314dc Author: Xi Ruoyao Date: Tue Oct 17 21:55:05 2023 +0800 LoongArch: Use fcmp.caf.s instead of movgr2cf for zeroing a fcc During the review of an LLVM change [1], on LA464 we found that zeroing an fcc with fcmp.caf.s is much faster than a movgr2cf from $r0. [1]: https://github.com/llvm/llvm-project/pull/69300 gcc/ChangeLog: * config/loongarch/loongarch.md (movfcc): Use fcmp.caf.s for zeroing a fcc. Diff: --- gcc/config/loongarch/loongarch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 3286b0c56ae4..9f5a75390829 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -2150,7 +2150,7 @@ [(set (match_operand:FCC 0 "register_operand" "=z") (const_int 0))] "" - "movgr2cf\t%0,$r0") + "fcmp.caf.s\t%0,$f0,$f0") ;; Conditional move instructions.