[llvm] [LoongArch] Introduce `32s` target feature for LA32S ISA extensions (PR #139695)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 00:23:08 PDT 2025


================
@@ -32,6 +32,13 @@ def IsLA32
 defvar LA32 = DefaultMode;
 def LA64 : HwMode<"+64bit", [IsLA64]>;
 
+// LoongArch 32-bit is divided into two variants, the reduced 32-bit variant
+// (LA32R) and the standard 32-bit variant (LA32S).
+def Feature32S
----------------
wangleiat wrote:

It is recommended to set `Feature32S` as a 64-bit implied feature, since `32S` is mandatory for `LoongArch64`. At the same time, `Feature32S` can be omitted from the feature list below. You can configure it this way:
```
def Feature64Bit                                                          
    : SubtargetFeature<"64bit", "HasLA64", "true",                        
                       "LA64 Basic Integer and Privilege Instruction Set",
                       [Feature32S]>;                                     
```

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


More information about the llvm-commits mailing list