[llvm] [RISCV] Add QingKe "XW" compressed opcode extension (PR #97925)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 6 17:26:52 PDT 2024


================
@@ -799,6 +800,14 @@ Error RISCVISAInfo::checkDependency() {
         errc::invalid_argument,
         "'zabha' requires 'a' or 'zaamo' extension to also be specified");
 
+  if (HasD && Exts.count("xwchc") != 0)
----------------
dtcxzyw wrote:

IIRC `xwchc` also requires `XLen == 32`.

```suggestion
  if (XLen != 32 && Exts.count("xwchc"))
    return createStringError(errc::invalid_argument,
                             "'xwchc' is only supported for 'rv32'");

  if (HasD && Exts.count("xwchc") != 0)
```

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


More information about the llvm-commits mailing list