llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-driver

Author: Sam Elliott (lenary)

<details>
<summary>Changes</summary>

This updates all the extensions to their version in the v0.10.0 spec.

All changes from this version are already implemented or are not relevant to 
LLVM.

This change also alphabetises the lists of Xqci extensions, to make future 
checks easier, and removes irrelevant info from the usage docs.

---

Patch is 28.75 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/137881.diff


5 Files Affected:

- (modified) clang/test/Driver/print-supported-extensions-riscv.c (+7-7) 
- (modified) llvm/docs/RISCVUsage.rst (+20-20) 
- (modified) llvm/lib/Target/RISCV/RISCVFeatures.td (+73-73) 
- (modified) llvm/test/CodeGen/RISCV/attributes.ll (+9-9) 
- (modified) llvm/unittests/TargetParser/RISCVISAInfoTest.cpp (+13-13) 


``````````diff
diff --git a/clang/test/Driver/print-supported-extensions-riscv.c 
b/clang/test/Driver/print-supported-extensions-riscv.c
index b10850aadddc3..d96077e787960 100644
--- a/clang/test/Driver/print-supported-extensions-riscv.c
+++ b/clang/test/Driver/print-supported-extensions-riscv.c
@@ -200,21 +200,21 @@
 // CHECK-NEXT:     ssctr                1.0       'Ssctr' (Control Transfer 
Records Supervisor Level)
 // CHECK-NEXT:     svukte               0.3       'Svukte' 
(Address-Independent Latency of User-Mode Faults to Supervisor Addresses)
 // CHECK-NEXT:     xqccmp               0.1       'Xqccmp' (Qualcomm 16-bit 
Push/Pop and Double Moves)
-// CHECK-NEXT:     xqcia                0.4       'Xqcia' (Qualcomm uC 
Arithmetic Extension)
+// CHECK-NEXT:     xqcia                0.7       'Xqcia' (Qualcomm uC 
Arithmetic Extension)
 // CHECK-NEXT:     xqciac               0.3       'Xqciac' (Qualcomm uC 
Load-Store Address Calculation Extension)
 // CHECK-NEXT:     xqcibi               0.2       'Xqcibi' (Qualcomm uC Branch 
Immediate Extension)
-// CHECK-NEXT:     xqcibm               0.4       'Xqcibm' (Qualcomm uC Bit 
Manipulation Extension)
-// CHECK-NEXT:     xqcicli              0.2       'Xqcicli' (Qualcomm uC 
Conditional Load Immediate Extension)
+// CHECK-NEXT:     xqcibm               0.7       'Xqcibm' (Qualcomm uC Bit 
Manipulation Extension)
+// CHECK-NEXT:     xqcicli              0.3       'Xqcicli' (Qualcomm uC 
Conditional Load Immediate Extension)
 // CHECK-NEXT:     xqcicm               0.2       'Xqcicm' (Qualcomm uC 
Conditional Move Extension)
 // CHECK-NEXT:     xqcics               0.2       'Xqcics' (Qualcomm uC 
Conditional Select Extension)
-// CHECK-NEXT:     xqcicsr              0.2       'Xqcicsr' (Qualcomm uC CSR 
Extension)
-// CHECK-NEXT:     xqciint              0.4       'Xqciint' (Qualcomm uC 
Interrupts Extension)
+// CHECK-NEXT:     xqcicsr              0.3       'Xqcicsr' (Qualcomm uC CSR 
Extension)
+// CHECK-NEXT:     xqciint              0.7       'Xqciint' (Qualcomm uC 
Interrupts Extension)
 // CHECK-NEXT:     xqciio               0.1       'Xqciio' (Qualcomm uC 
External Input Output Extension)
 // CHECK-NEXT:     xqcilb               0.2       'Xqcilb' (Qualcomm uC Long 
Branch Extension)
 // CHECK-NEXT:     xqcili               0.2       'Xqcili' (Qualcomm uC Load 
Large Immediate Extension)
 // CHECK-NEXT:     xqcilia              0.2       'Xqcilia' (Qualcomm uC Large 
Immediate Arithmetic Extension)
-// CHECK-NEXT:     xqcilo               0.2       'Xqcilo' (Qualcomm uC Large 
Offset Load Store Extension)
-// CHECK-NEXT:     xqcilsm              0.2       'Xqcilsm' (Qualcomm uC Load 
Store Multiple Extension)
+// CHECK-NEXT:     xqcilo               0.3       'Xqcilo' (Qualcomm uC Large 
Offset Load Store Extension)
+// CHECK-NEXT:     xqcilsm              0.5       'Xqcilsm' (Qualcomm uC Load 
Store Multiple Extension)
 // CHECK-NEXT:     xqcisim              0.2       'Xqcisim' (Qualcomm uC 
Simulation Hint Extension)
 // CHECK-NEXT:     xqcisls              0.2       'Xqcisls' (Qualcomm uC 
Scaled Load Store Extension)
 // CHECK-NEXT:     xqcisync             0.2       'Xqcisync' (Qualcomm uC Sync 
Delay Extension)
diff --git a/llvm/docs/RISCVUsage.rst b/llvm/docs/RISCVUsage.rst
index d0689b779f551..49635273a036f 100644
--- a/llvm/docs/RISCVUsage.rst
+++ b/llvm/docs/RISCVUsage.rst
@@ -440,58 +440,58 @@ The current vendor extensions supported are:
   LLVM implements `version 0.1 of the 16-bit Push/Pop instructions and 
double-moves extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqccmp_extension-0.1.0>`__
 by Qualcomm. All instructions are prefixed with `qc.` as described in the 
specification.
 
 ``experimental-Xqcia``
-  LLVM implements `version 0.4 of the Qualcomm uC Arithmetic extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.7 of the Qualcomm uC Arithmetic extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqciac``
-  LLVM implements `version 0.3 of the Qualcomm uC Load-Store Address 
Calculation extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.3 of the Qualcomm uC Load-Store Address 
Calculation extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcibi``
-  LLVM implements `version 0.2 of the Qualcomm uC Branch Immediate extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Branch Immediate extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcibm``
-  LLVM implements `version 0.4 of the Qualcomm uC Bit Manipulation extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.7 of the Qualcomm uC Bit Manipulation extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcicli``
-  LLVM implements `version 0.2 of the Qualcomm uC Conditional Load Immediate 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.3 of the Qualcomm uC Conditional Load Immediate 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcicm``
-  LLVM implements `version 0.2 of the Qualcomm uC Conditional Move extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Conditional Move extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcics``
-  LLVM implements `version 0.2 of the Qualcomm uC Conditional Select extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Conditional Select extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcicsr``
-  LLVM implements `version 0.2 of the Qualcomm uC CSR extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
-
-``experimental-Xqciio``
-  LLVM implements `version 0.1 of the Qualcomm uC External Input Output 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.3 of the Qualcomm uC CSR extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqciint``
-  LLVM implements `version 0.4 of the Qualcomm uC Interrupts extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.7 of the Qualcomm uC Interrupts extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
+
+``experimental-Xqciio``
+  LLVM implements `version 0.1 of the Qualcomm uC External Input Output 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcilb``
-  LLVM implements `version 0.2 of the Qualcomm uC Long Branch extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Long Branch extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcili``
-  LLVM implements `version 0.2 of the Qualcomm uC Load Large Immediate 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Load Large Immediate 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcilia``
-  LLVM implements `version 0.2 of the Qualcomm uC Large Immediate Arithmetic 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Large Immediate Arithmetic 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcilo``
-  LLVM implements `version 0.2 of the Qualcomm uC Large Offset Load Store 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.3 of the Qualcomm uC Large Offset Load Store 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcilsm``
-  LLVM implements `version 0.2 of the Qualcomm uC Load Store Multiple 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm.  All 
instructions are prefixed with `qc.` as described in the specification. These 
instructions are only available for riscv32.
+  LLVM implements `version 0.5 of the Qualcomm uC Load Store Multiple 
extension specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcisim``
-  LLVM implements `version 0.2 of the Qualcomm uC Simulation Hint extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Simulation Hint extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcisls``
-  LLVM implements `version 0.2 of the Qualcomm uC Scaled Load Store extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Scaled Load Store extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``experimental-Xqcisync``
-  LLVM implements `version 0.2 of the Qualcomm uC Sync Delay extension 
specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by 
Qualcomm.  All instructions are prefixed with `qc.` as described in the 
specification. These instructions are only available for riscv32.
+  LLVM implements `version 0.2 of the Qualcomm uC Sync Delay extension 
specification 
<https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.10.0>`__ by 
Qualcomm. These instructions are only available for riscv32.
 
 ``Xmipscmov``
   LLVM implements conditional move for the `p8700 processor 
<https://mips.com/products/hardware/p8700/>` by MIPS.
diff --git a/llvm/lib/Target/RISCV/RISCVFeatures.td 
b/llvm/lib/Target/RISCV/RISCVFeatures.td
index 18d341aa5b5ca..be172462c2953 100644
--- a/llvm/lib/Target/RISCV/RISCVFeatures.td
+++ b/llvm/lib/Target/RISCV/RISCVFeatures.td
@@ -1342,45 +1342,23 @@ def HasVendorXwchc
       AssemblerPredicate<(all_of FeatureVendorXwchc),
                          "'Xwchc' (WCH/QingKe additional compressed opcodes)">;
 
-// Qualcomm Extension(s)
+// Qualcomm Extensions
 
-def FeatureVendorXqcicsr
-    : RISCVExperimentalExtension<0, 2, "Qualcomm uC CSR Extension">;
-def HasVendorXqcicsr
-    : Predicate<"Subtarget->hasVendorXqcicsr()">,
-      AssemblerPredicate<(all_of FeatureVendorXqcicsr),
-                         "'Xqcicsr' (Qualcomm uC CSR Extension)">;
-
-def FeatureVendorXqcisls
-    : RISCVExperimentalExtension<0, 2,
-                                 "Qualcomm uC Scaled Load Store Extension">;
-def HasVendorXqcisls
-    : Predicate<"Subtarget->hasVendorXqcisls()">,
-      AssemblerPredicate<(all_of FeatureVendorXqcisls),
-                         "'Xqcisls' (Qualcomm uC Scaled Load Store 
Extension)">;
+def FeatureVendorXqccmp
+    : RISCVExperimentalExtension<0, 1, "Qualcomm 16-bit Push/Pop and Double 
Moves",
+                                 [FeatureStdExtZca]>;
+def HasVendorXqccmp
+    : Predicate<"Subtarget->hasVendorXqccmp()">,
+      AssemblerPredicate<(all_of FeatureVendorXqccmp),
+                         "'Xqccmp' (Qualcomm 16-bit Push/Pop and Double 
Moves)">;
 
 def FeatureVendorXqcia
-    : RISCVExperimentalExtension<0, 4, "Qualcomm uC Arithmetic Extension">;
+    : RISCVExperimentalExtension<0, 6, "Qualcomm uC Arithmetic Extension">;
 def HasVendorXqcia
     : Predicate<"Subtarget->hasVendorXqcia()">,
       AssemblerPredicate<(all_of FeatureVendorXqcia),
                          "'Xqcia' (Qualcomm uC Arithmetic Extension)">;
 
-def FeatureVendorXqcics
-    : RISCVExperimentalExtension<0, 2, "Qualcomm uC Conditional Select 
Extension">;
-def HasVendorXqcics
-    : Predicate<"Subtarget->hasVendorXqcics()">,
-      AssemblerPredicate<(all_of FeatureVendorXqcics),
-                         "'Xqcics' (Qualcomm uC Conditional Select 
Extension)">;
-
-def FeatureVendorXqcilsm
-    : RISCVExperimentalExtension<0, 2,
-                                 "Qualcomm uC Load Store Multiple Extension">;
-def HasVendorXqcilsm
-    : Predicate<"Subtarget->hasVendorXqcilsm()">,
-      AssemblerPredicate<(all_of FeatureVendorXqcilsm),
-                         "'Xqcilsm' (Qualcomm uC Load Store Multiple 
Extension)">;
-
 def FeatureVendorXqciac
     : RISCVExperimentalExtension<0, 3, "Qualcomm uC Load-Store Address 
Calculation Extension",
                                  [FeatureStdExtZca]>;
@@ -1389,8 +1367,24 @@ def HasVendorXqciac
       AssemblerPredicate<(all_of FeatureVendorXqciac),
                          "'Xqciac' (Qualcomm uC Load-Store Address Calculation 
Extension)">;
 
+def FeatureVendorXqcibi
+    : RISCVExperimentalExtension<0, 2, "Qualcomm uC Branch Immediate 
Extension",
+                                 [FeatureStdExtZca]>;
+def HasVendorXqcibi
+    : Predicate<"Subtarget->hasVendorXqcibi()">,
+      AssemblerPredicate<(all_of FeatureVendorXqcibi),
+                         "'Xqcibi' (Qualcomm uC Branch Immediate Extension)">;
+
+def FeatureVendorXqcibm
+    : RISCVExperimentalExtension<0, 7, "Qualcomm uC Bit Manipulation 
Extension",
+                                 [FeatureStdExtZca]>;
+def HasVendorXqcibm
+    : Predicate<"Subtarget->hasVendorXqcibm()">,
+      AssemblerPredicate<(all_of FeatureVendorXqcibm),
+                         "'Xqcibm' (Qualcomm uC Bit Manipulation Extension)">;
+
 def FeatureVendorXqcicli
-    : RISCVExperimentalExtension<0, 2,
+    : RISCVExperimentalExtension<0, 3,
                                  "Qualcomm uC Conditional Load Immediate 
Extension">;
 def HasVendorXqcicli
     : Predicate<"Subtarget->hasVendorXqcicli()">,
@@ -1405,35 +1399,49 @@ def HasVendorXqcicm
       AssemblerPredicate<(all_of FeatureVendorXqcicm),
                          "'Xqcicm' (Qualcomm uC Conditional Move Extension)">;
 
-def FeatureVendorXqciio
-    : RISCVExperimentalExtension<0, 1, "Qualcomm uC External Input Output 
Extension">;
-def HasVendorXqciio
-    : Predicate<"Subtarget->hasVendorXqciio()">,
-      AssemblerPredicate<(all_of FeatureVendorXqciio),
-                         "'Xqciio' (Qualcomm uC External Input Output 
Extension)">;
+def FeatureVendorXqcics
+    : RISCVExperimentalExtension<0, 2, "Qualcomm uC Conditional Select 
Extension">;
+def HasVendorXqcics
+    : Predicate<"Subtarget->hasVendorXqcics()">,
+      AssemblerPredicate<(all_of FeatureVendorXqcics),
+                         "'Xqcics' (Qualcomm uC Conditional Select 
Extension)">;
+
+def FeatureVendorXqcicsr
+    : RISCVExperimentalExtension<0, 3, "Qualcomm uC CSR Extension">;
+def HasVendorXqcicsr
+    : Predicate<"Subtarget->hasVendorXqcicsr()">,
+      AssemblerPredicate<(all_of FeatureVendorXqcicsr),
+                         "'Xqcicsr' (Qualcomm uC CSR Extension)">;
 
 def FeatureVendorXqciint
-    : RISCVExperimentalExtension<0, 4, "Qualcomm uC Interrupts Extension",
+    : RISCVExperimentalExtension<0, 7, "Qualcomm uC Interrupts Extension",
                                  [FeatureStdExtZca]>;
 def HasVendorXqciint
     : Predicate<"Subtarget->hasVendorXqciint()">,
       AssemblerPredicate<(all_of FeatureVendorXqciint),
                          "'Xqciint' (Qualcomm uC Interrupts Extension)">;
 
+def FeatureVendorXqciio
+    : RISCVExperimentalExtension<0, 1, "Qualcomm uC External Input Output 
Extension">;
+def HasVendorXqciio
+    : Predicate<"Subtarget->hasVendorXqciio()">,
+      AssemblerPredicate<(all_of FeatureVendorXqciio),
+                         "'Xqciio' (Qualcomm uC External Input Output 
Extension)">;
+
 def FeatureVendorXqcilb
     : RISCVExperimentalExtension<0, 2, "Qualcomm uC Long Branch Extension",
                                  [FeatureStdExtZca]>;
-
-def HasVendorXqcilb : Predicate<"Subtarget->hasVendorXqcilb()">,
-                      AssemblerPredicate<(all_of FeatureVendorXqcilb),
+def HasVendorXqcilb 
+    : Predicate<"Subtarget->hasVendorXqcilb()">,
+      AssemblerPredicate<(all_of FeatureVendorXqcilb),
                          "'Xqcilb' (Qualcomm uC Long Branch Extension)">;
 
 def FeatureVendorXqcili
     : RISCVExperimentalExtension<0, 2, "Qualcomm uC Load Large Immediate 
Extension",
                                  [FeatureStdExtZca]>;
-
-def HasVendorXqcili : Predicate<"Subtarget->hasVendorXqcili()">,
-                      AssemblerPredicate<(all_of FeatureVendorXqcili),
+def HasVendorXqcili
+    : Predicate<"Subtarget->hasVendo...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/137881
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to