36 lines
1017 B
Diff
36 lines
1017 B
Diff
|
|
From 35bce671a97b27a41c425109ba92b24ab87ff35b Mon Sep 17 00:00:00 2001
|
||
|
|
From: Xi Ruoyao <xry111@xry111.site>
|
||
|
|
Date: Tue, 17 Oct 2023 21:55:05 +0800
|
||
|
|
Subject: [PATCH 010/188] 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.
|
||
|
|
---
|
||
|
|
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 73e2cbe0b..5f9e63d66 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.
|
||
|
|
|
||
|
|
--
|
||
|
|
2.43.0
|
||
|
|
|