[llvm] [LoongArch] Implement COPY instruction between CFRs (PR #69300)

WÁNG Xuěruì via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 01:59:30 PDT 2023


================
@@ -126,6 +126,23 @@ def PseudoST_CFR : Pseudo<(outs),
 let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in
 def PseudoLD_CFR : Pseudo<(outs CFR:$ccd),
                           (ins GPR:$rj, grlenimm:$imm)>;
+
+// SET_CFR_{FALSE,TRUE}
+// These instructions are defined in order to avoid expensive check error when
+// expanding `PseudoCopyCFR` instruction.
+// fcmp.caf.s $dst, $fa0, $fa0
+def SET_CFR_FALSE : SET_CFR<0x0c100000, "fcmp.caf.s">;
+// fcmp.cueq.s $dst, $fa0, $fa0
+def SET_CFR_TRUE  : SET_CFR<0x0c160000, "fcmp.cueq.s">;
+
+// Pseudo instruction for COPY CFRs.
----------------
xen0n wrote:

```suggestion
// Pseudo instruction for copying CFRs.
```

https://github.com/llvm/llvm-project/pull/69300


More information about the llvm-commits mailing list