aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-10-17 21:55:05 +0800
committerXi Ruoyao <xry111@xry111.site>2023-10-18 16:25:05 +0800
commitb588dcb77e96d77777eb5647cba9e8f454e314dc (patch)
tree7a965d4f8df0da81174055db3c470a5d53d649c9
parentb0372ef12f6f7f863606b0d2858d049b18a4cfda (diff)
downloadgcc-b588dcb77e96d77777eb5647cba9e8f454e314dc.zip
gcc-b588dcb77e96d77777eb5647cba9e8f454e314dc.tar.gz
gcc-b588dcb77e96d77777eb5647cba9e8f454e314dc.tar.bz2
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.
-rw-r--r--gcc/config/loongarch/loongarch.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
index 3286b0c..9f5a753 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.