Skip to content

Commit 70e7d26

Browse files
authored
[RISCV] Mark zacas as experimental again due to unresolved ABI issue (#99898)
As discussed at the last sync-up call, mark Zacas as experimental until this ABI issue is resolved <riscv-non-isa/riscv-elf-psabi-doc#444>. Don't return Zacas in getHostCPUFeatures (leaving a TODO there) as even if requesting detection of "native" features, the user likely doesn't want to automatically opt in to experimental codegen.
1 parent 404ca22 commit 70e7d26

16 files changed

+53
-56
lines changed

clang/test/Preprocessor/riscv-target-features.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
// CHECK-NOT: __riscv_za64rs {{.*$}}
8787
// CHECK-NOT: __riscv_zaamo {{.*$}}
8888
// CHECK-NOT: __riscv_zabha {{.*$}}
89-
// CHECK-NOT: __riscv_zacas {{.*$}}
9089
// CHECK-NOT: __riscv_zalrsc {{.*$}}
9190
// CHECK-NOT: __riscv_zama16b {{.*$}}
9291
// CHECK-NOT: __riscv_zawrs {{.*$}}
@@ -182,6 +181,7 @@
182181
// CHECK-NOT: __riscv_sspm{{.*$}}
183182
// CHECK-NOT: __riscv_ssqosid{{.*$}}
184183
// CHECK-NOT: __riscv_supm{{.*$}}
184+
// CHECK-NOT: __riscv_zacas {{.*$}}
185185
// CHECK-NOT: __riscv_zalasr {{.*$}}
186186
// CHECK-NOT: __riscv_zfbfmin {{.*$}}
187187
// CHECK-NOT: __riscv_zicfilp {{.*$}}
@@ -747,14 +747,6 @@
747747
// RUN: -o - | FileCheck --check-prefix=CHECK-ZABHA-EXT %s
748748
// CHECK-ZABHA-EXT: __riscv_zabha 1000000{{$}}
749749

750-
// RUN: %clang --target=riscv32 \
751-
// RUN: -march=rv32ia_zacas1p0 -E -dM %s \
752-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
753-
// RUN: %clang --target=riscv64 \
754-
// RUN: -march=rv64ia_zacas1p0 -E -dM %s \
755-
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
756-
// CHECK-ZACAS-EXT: __riscv_zacas 1000000{{$}}
757-
758750
// RUN: %clang --target=riscv32 \
759751
// RUN: -march=rv32i_zalrsc1p0 -E -dM %s \
760752
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALRSC-EXT %s
@@ -1626,6 +1618,14 @@
16261618
// CHECK-ZVKT-EXT: __riscv_zvkt 1000000{{$}}
16271619

16281620
// Experimental extensions
1621+
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1622+
// RUN: -march=rv32ia_zacas1p0 -E -dM %s \
1623+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
1624+
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1625+
// RUN: -march=rv64ia_zacas1p0 -E -dM %s \
1626+
// RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s
1627+
// CHECK-ZACAS-EXT: __riscv_zacas 1000000{{$}}
1628+
16291629
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
16301630
// RUN: -march=rv32i_zalasr0p1 -E -dM %s \
16311631
// RUN: -o - | FileCheck --check-prefix=CHECK-ZALASR-EXT %s

llvm/docs/RISCVUsage.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ on support follow.
153153
``Za64rs`` Supported (`See note <#riscv-profiles-extensions-note>`__)
154154
``Zaamo`` Assembly Support
155155
``Zabha`` Supported
156-
``Zacas`` Supported (`See note <#riscv-zacas-note>`__)
157156
``Zalrsc`` Assembly Support
158157
``Zama16b`` Supported (`See note <#riscv-profiles-extensions-note>`__)
159158
``Zawrs`` Assembly Support
@@ -281,11 +280,6 @@ Supported
281280
``Za128rs``, ``Za64rs``, ``Zama16b``, ``Zic64b``, ``Ziccamoa``, ``Ziccif``, ``Zicclsm``, ``Ziccrse``, ``Shcounterenvw``, ``Shgatpa``, ``Shtvala``, ``Shvsatpa``, ``Shvstvala``, ``Shvstvecd``, ``Ssccptr``, ``Sscounterenw``, ``Ssstateen``, ``Ssstrict``, ``Sstvala``, ``Sstvecd``, ``Ssu64xl``, ``Svade``, ``Svbare``
282281
These extensions are defined as part of the `RISC-V Profiles specification <https://github.com/riscv/riscv-profiles/releases/tag/v1.0>`__. They do not introduce any new features themselves, but instead describe existing hardware features.
283282

284-
.. _riscv-zacas-note:
285-
286-
``Zacas``
287-
amocas.w will be used for i32 cmpxchg. amocas.d will be used i64 cmpxchg on RV64. The compiler will not generate amocas.d on RV32 or amocas.q on RV64 due to ABI compatibilty. These can only be used in the assembler.
288-
289283
Experimental Extensions
290284
=======================
291285

@@ -299,6 +293,9 @@ The primary goal of experimental support is to assist in the process of ratifica
299293
``experimental-ssqosid``
300294
LLVM implements assembler support for the `v1.0-rc1 draft specification <https://github.com/riscv/riscv-ssqosid/releases/tag/v1.0-rc1>`_.
301295

296+
``experimental-zacas``
297+
LLVM implements the `1.0 release specification <https://github.com/riscvarchive/riscv-zacas/releases/tag/v1.0>`__. amocas.w will be used for i32 cmpxchg. amocas.d will be used i64 cmpxchg on RV64. The compiler will not generate amocas.d on RV32 or amocas.q on RV64 due to ABI compatibilty. These can only be used in the assembler. The extension will be left as experimental until `an ABI issue <https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/444>`__ is resolved.
298+
302299
``experimental-zalasr``
303300
LLVM implements the `0.0.5 draft specification <https://github.com/mehnadnerd/riscv-zalasr>`__.
304301

llvm/docs/ReleaseNotes.rst

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ Changes to the RISC-V Backend
185185
* Codegen support was added for the Zimop (May-Be-Operations) extension.
186186
* The experimental Ssnpm, Smnpm, Smmpm, Sspm, and Supm 1.0.0 Pointer Masking extensions are supported.
187187
* The experimental Ssqosid extension is supported.
188-
* Zacas is no longer experimental.
189188
* Added the CSR names from the Resumable Non-Maskable Interrupts (Smrnmi) extension.
190189
* llvm-objdump now prints disassembled opcode bytes in groups of 2 or 4 bytes to
191190
match GNU objdump. The bytes within the groups are in big endian order.

llvm/lib/Target/RISCV/RISCVFeatures.td

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def HasStdExtZabha : Predicate<"Subtarget->hasStdExtZabha()">,
243243
"'Zabha' (Byte and Halfword Atomic Memory Operations)">;
244244

245245
def FeatureStdExtZacas
246-
: RISCVExtension<"zacas", 1, 0,
247-
"'Zacas' (Atomic Compare-And-Swap Instructions)">,
246+
: RISCVExperimentalExtension<"zacas", 1, 0,
247+
"'Zacas' (Atomic Compare-And-Swap Instructions)">,
248248
RISCVExtensionBitmask<0, 26>;
249249
def HasStdExtZacas : Predicate<"Subtarget->hasStdExtZacas()">,
250250
AssemblerPredicate<(all_of FeatureStdExtZacas),

llvm/lib/TargetParser/Host.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,8 @@ const StringMap<bool> sys::getHostCPUFeatures() {
20672067
Features["zvfhmin"] = ExtMask & (1ULL << 31); // RISCV_HWPROBE_EXT_ZVFHMIN
20682068
Features["zfa"] = ExtMask & (1ULL << 32); // RISCV_HWPROBE_EXT_ZFA
20692069
Features["ztso"] = ExtMask & (1ULL << 33); // RISCV_HWPROBE_EXT_ZTSO
2070-
Features["zacas"] = ExtMask & (1ULL << 34); // RISCV_HWPROBE_EXT_ZACAS
2070+
// TODO: Re-enable zacas when it is marked non-experimental again.
2071+
// Features["zacas"] = ExtMask & (1ULL << 34); // RISCV_HWPROBE_EXT_ZACAS
20712072
Features["zicond"] = ExtMask & (1ULL << 35); // RISCV_HWPROBE_EXT_ZICOND
20722073
Features["zihintpause"] =
20732074
ExtMask & (1ULL << 36); // RISCV_HWPROBE_EXT_ZIHINTPAUSE

llvm/test/CodeGen/RISCV/atomic-cmpxchg-branch-on-result.ll

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -mtriple=riscv32 -mattr=+a -verify-machineinstrs < %s \
33
; RUN: | FileCheck -check-prefixes=NOZACAS,RV32IA %s
4-
; RUN: llc -mtriple=riscv32 -mattr=+a,+zacas -verify-machineinstrs < %s \
4+
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
55
; RUN: | FileCheck -check-prefixes=ZACAS,RV32IA-ZACAS %s
66
; RUN: llc -mtriple=riscv64 -mattr=+a -verify-machineinstrs < %s \
77
; RUN: | FileCheck -check-prefixes=NOZACAS,RV64IA %s
8-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas -verify-machineinstrs < %s \
8+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
99
; RUN: | FileCheck -check-prefixes=ZACAS,RV64IA-ZACAS %s
10-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas,+zabha -verify-machineinstrs < %s \
10+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas,+zabha -verify-machineinstrs < %s \
1111
; RUN: | FileCheck -check-prefixes=ZACAS,RV64IA-ZABHA %s
1212

1313
; Test cmpxchg followed by a branch on the cmpxchg success value to see if the

llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
; RUN: | FileCheck -check-prefix=RV32I %s
44
; RUN: llc -mtriple=riscv32 -mattr=+a -verify-machineinstrs < %s \
55
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-WMO %s
6-
; RUN: llc -mtriple=riscv32 -mattr=+a,+zacas -verify-machineinstrs < %s \
6+
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
77
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-ZACAS,RV32IA-WMO-ZACAS %s
88
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso -verify-machineinstrs < %s \
99
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-TSO %s
10-
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso,+zacas -verify-machineinstrs < %s \
10+
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso,+experimental-zacas -verify-machineinstrs < %s \
1111
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-ZACAS,RV32IA-TSO-ZACAS %s
1212
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
1313
; RUN: | FileCheck -check-prefix=RV64I %s
1414
; RUN: llc -mtriple=riscv64 -mattr=+a -verify-machineinstrs < %s \
1515
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-WMO %s
16-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas -verify-machineinstrs < %s \
16+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
1717
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZACAS,RV64IA-WMO-ZACAS %s
18-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas,+zabha -verify-machineinstrs < %s \
18+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas,+zabha -verify-machineinstrs < %s \
1919
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZABHA,RV64IA-WMO-ZABHA %s
2020
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso -verify-machineinstrs < %s \
2121
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-TSO %s
22-
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zacas -verify-machineinstrs < %s \
22+
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+experimental-zacas -verify-machineinstrs < %s \
2323
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZACAS,RV64IA-TSO-ZACAS %s
24-
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zacas,+zabha -verify-machineinstrs < %s \
24+
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+experimental-zacas,+zabha -verify-machineinstrs < %s \
2525
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZABHA,RV64IA-TSO-ZABHA %s
2626

2727
define void @cmpxchg_i8_monotonic_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {

llvm/test/CodeGen/RISCV/atomic-rmw.ll

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso -verify-machineinstrs < %s \
1313
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-NOZACAS,RV64IA-TSO,RV64IA-TSO-NOZACAS %s
1414

15-
; RUN: llc -mtriple=riscv32 -mattr=+a,+zacas -verify-machineinstrs < %s \
15+
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
1616
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-ZACAS,RV32IA-WMO,RV32IA-WMO-ZACAS %s
17-
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso,+zacas -verify-machineinstrs < %s \
17+
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso,+experimental-zacas -verify-machineinstrs < %s \
1818
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-ZACAS,RV32IA-TSO,RV32IA-TSO-ZACAS %s
19-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas -verify-machineinstrs < %s \
19+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
2020
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZACAS,RV64IA-WMO,RV64IA-WMO-ZACAS %s
21-
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zacas -verify-machineinstrs < %s \
21+
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+experimental-zacas -verify-machineinstrs < %s \
2222
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZACAS,RV64IA-TSO,RV64IA-TSO-ZACAS %s
2323

2424
; RUN: llc -mtriple=riscv64 -mattr=+a,+zabha -verify-machineinstrs < %s \
2525
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-WMO,RV64IA-WMO-ZABHA,RV64IA-WMO-ZABHA-NOZACAS %s
2626
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zabha -verify-machineinstrs < %s \
2727
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-TSO,RV64IA-TSO-ZABHA,RV64IA-TSO-ZABHA-NOZACAS %s
28-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zabha,+zacas -verify-machineinstrs < %s \
28+
; RUN: llc -mtriple=riscv64 -mattr=+a,+zabha,+experimental-zacas -verify-machineinstrs < %s \
2929
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-WMO,RV64IA-WMO-ZABHA,RV64IA-WMO-ZABHA-ZACAS %s
30-
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zabha,+zacas -verify-machineinstrs < %s \
30+
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso,+zabha,+experimental-zacas -verify-machineinstrs < %s \
3131
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-TSO,RV64IA-TSO-ZABHA,RV64IA-TSO-ZABHA-ZACAS %s
3232

3333
define i8 @atomicrmw_xchg_i8_monotonic(ptr %a, i8 %b) nounwind {

llvm/test/CodeGen/RISCV/atomic-signext.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
; RUN: | FileCheck -check-prefix=RV32I %s
44
; RUN: llc -mtriple=riscv32 -mattr=+a -verify-machineinstrs < %s \
55
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-NOZACAS %s
6-
; RUN: llc -mtriple=riscv32 -mattr=+a,+zacas -verify-machineinstrs < %s \
6+
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
77
; RUN: | FileCheck -check-prefixes=RV32IA,RV32IA-ZACAS %s
88
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
99
; RUN: | FileCheck -check-prefix=RV64I %s
1010
; RUN: llc -mtriple=riscv64 -mattr=+a -verify-machineinstrs < %s \
1111
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-NOZACAS %s
12-
; RUN: llc -mtriple=riscv64 -mattr=+a,+zacas -verify-machineinstrs < %s \
12+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas -verify-machineinstrs < %s \
1313
; RUN: | FileCheck -check-prefixes=RV64IA,RV64IA-ZACAS %s
1414

1515
define signext i8 @atomic_load_i8_unordered(ptr %a) nounwind {

llvm/test/CodeGen/RISCV/attributes.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
; RUN: llc -mtriple=riscv32 -mattr=+zfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZFBFMIN %s
121121
; RUN: llc -mtriple=riscv32 -mattr=+zvfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFMIN %s
122122
; RUN: llc -mtriple=riscv32 -mattr=+zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFWMA %s
123-
; RUN: llc -mtriple=riscv32 -mattr=+a,zacas %s -o - | FileCheck --check-prefix=RV32ZACAS %s
123+
; RUN: llc -mtriple=riscv32 -mattr=+a,+experimental-zacas %s -o - | FileCheck --check-prefix=RV32ZACAS %s
124124
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV32ZALASR %s
125125
; RUN: llc -mtriple=riscv32 -mattr=+zama16b %s -o - | FileCheck --check-prefixes=CHECK,RV32ZAMA16B %s
126126
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV32ZICFILP %s
@@ -259,7 +259,7 @@
259259
; RUN: llc -mtriple=riscv64 -mattr=+zfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV64ZFBFMIN %s
260260
; RUN: llc -mtriple=riscv64 -mattr=+zvfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV64ZVFBFMIN %s
261261
; RUN: llc -mtriple=riscv64 -mattr=+zvfbfwma %s -o - | FileCheck --check-prefixes=CHECK,RV64ZVFBFWMA %s
262-
; RUN: llc -mtriple=riscv64 -mattr=+a,zacas %s -o - | FileCheck --check-prefix=RV64ZACAS %s
262+
; RUN: llc -mtriple=riscv64 -mattr=+a,+experimental-zacas %s -o - | FileCheck --check-prefix=RV64ZACAS %s
263263
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zalasr %s -o - | FileCheck --check-prefix=RV64ZALASR %s
264264
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp %s -o - | FileCheck --check-prefix=RV64ZICFILP %s
265265
; RUN: llc -mtriple=riscv64 -mattr=+a,+zabha %s -o - | FileCheck --check-prefix=RV64ZABHA %s

llvm/test/MC/RISCV/rv32zacas-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not llvm-mc -triple riscv32 -mattr=+a,zacas < %s 2>&1 | FileCheck %s
1+
# RUN: not llvm-mc -triple riscv32 -mattr=+a,+experimental-zacas < %s 2>&1 | FileCheck %s
22

33
# Non-zero offsets not supported for the third operand (rs1).
44
amocas.w a1, a3, 1(a5) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0

llvm/test/MC/RISCV/rv32zacas-valid.s

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+a,+zacas -riscv-no-aliases -show-encoding \
1+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+a,+experimental-zacas -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+zacas -riscv-no-aliases -show-encoding \
3+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+experimental-zacas -riscv-no-aliases -show-encoding \
44
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5-
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+a,+zacas < %s \
6-
# RUN: | llvm-objdump --mattr=+a,+zacas -M no-aliases -d -r - \
5+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+a,+experimental-zacas < %s \
6+
# RUN: | llvm-objdump --mattr=+a,+experimental-zacas -M no-aliases -d -r - \
77
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+zacas < %s \
9-
# RUN: | llvm-objdump --mattr=+a,+zacas -M no-aliases -d -r - \
8+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+experimental-zacas < %s \
9+
# RUN: | llvm-objdump --mattr=+a,+experimental-zacas -M no-aliases -d -r - \
1010
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1111
# RUN: not llvm-mc -triple=riscv32 -mattr=+a -show-encoding %s 2>&1 \
1212
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR

llvm/test/MC/RISCV/rv64zacas-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not llvm-mc -triple riscv64 -mattr=+experimental-zacas < %s 2>&1 | FileCheck %s
1+
# RUN: not llvm-mc -triple riscv64 -mattr=+a,+experimental-zacas < %s 2>&1 | FileCheck %s
22

33
# Non-zero offsets not supported for the third operand (rs1).
44
amocas.w a1, a3, 1(a5) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0

llvm/test/MC/RISCV/rv64zacas-valid.s

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,zacas -riscv-no-aliases -show-encoding \
1+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+experimental-zacas -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,zacas < %s \
4-
# RUN: | llvm-objdump --mattr=+a,zacas -M no-aliases -d -r - \
3+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+experimental-zacas < %s \
4+
# RUN: | llvm-objdump --mattr=+a,+experimental-zacas -M no-aliases -d -r - \
55
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
66
# RUN: not llvm-mc -triple=riscv64 -mattr=+a -show-encoding %s 2>&1 \
77
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR

llvm/test/MC/RISCV/rvzabha-zacas-valid.s

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# RUN: llvm-mc %s -triple=riscv32 -mattr=+a,+zabha,+zacas -riscv-no-aliases -show-encoding \
1+
# RUN: llvm-mc %s -triple=riscv32 -mattr=+a,+zabha,+experimental-zacas -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3-
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+zabha,+zacas -riscv-no-aliases -show-encoding \
3+
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+zabha,+experimental-zacas -riscv-no-aliases -show-encoding \
44
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5-
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+a,+zabha,+zacas < %s \
6-
# RUN: | llvm-objdump --mattr=+a,+zabha,+zacas -M no-aliases -d -r - \
5+
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+a,+zabha,+experimental-zacas < %s \
6+
# RUN: | llvm-objdump --mattr=+a,+zabha,+experimental-zacas -M no-aliases -d -r - \
77
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8-
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+zabha,+zacas < %s \
9-
# RUN: | llvm-objdump --mattr=+a,+zabha,+zacas -M no-aliases -d -r - \
8+
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+zabha,+experimental-zacas < %s \
9+
# RUN: | llvm-objdump --mattr=+a,+zabha,+experimental-zacas -M no-aliases -d -r - \
1010
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
1111
# RUN: not llvm-mc -triple=riscv32 -mattr=+a,+zabha -show-encoding %s 2>&1 \
1212
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ R"(All available -march extensions for RISC-V
892892
za64rs 1.0
893893
zaamo 1.0
894894
zabha 1.0
895-
zacas 1.0
896895
zalrsc 1.0
897896
zama16b 1.0
898897
zawrs 1.0
@@ -1028,6 +1027,7 @@ R"(All available -march extensions for RISC-V
10281027
Experimental extensions
10291028
zicfilp 1.0 This is a long dummy description
10301029
zicfiss 1.0
1030+
zacas 1.0
10311031
zalasr 0.1
10321032
smmpm 1.0
10331033
smnpm 1.0

0 commit comments

Comments
 (0)