[llvm] [RISCV][Xqcili] Implement Load Immediate Support (PR #132496)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 21 23:09:46 PDT 2025


================
@@ -57,6 +61,25 @@ static void generateInstSeqImpl(int64_t Val, const MCSubtargetInfo &STI,
     return;
   }
 
+  if (!IsRV64 && STI.hasFeature(RISCV::FeatureVendorXqcili)) {
+    bool FitsOneStandardInst =
+        ((Val & 0xFFF) == 0) || (((Val + 0x800) & 0xFFFFF000) == 0);
----------------
topperc wrote:

Can we do

```
return ((Val & 0xFFF) == 0) || isInt<12>(Val);
```

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


More information about the llvm-commits mailing list