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

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 02:32:24 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
----------------
wangleiat wrote:

If use regular instruction will generate the following errors:
```
*** Bad machine code: Using an undefined physical register ***
- function:    test                                           
- basic block: %bb.0  (0x8deaa0)                              
- instruction: $fcc1 = FCMP_CAF_S $f0, $f0                    
- operand 2:   $f0                                            
```

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


More information about the llvm-commits mailing list