[llvm] [RISC-V] Avoid using an allocated extension name in invalid-attributes.s (PR #177094)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 20 21:49:30 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-risc-v

Author: Alexander Richardson (arichardson)

<details>
<summary>Changes</summary>

The Y extension has been allocated and will no longer trigger an error
once https://github.com/llvm/llvm-project/pull/176870 lands. Use 't' to
test this case instead which is still marked as reserved and as far as I
know is not currently reserved for any future extensions.


---
Full diff: https://github.com/llvm/llvm-project/pull/177094.diff


1 Files Affected:

- (modified) llvm/test/MC/RISCV/invalid-attribute.s (+5-2) 


``````````diff
diff --git a/llvm/test/MC/RISCV/invalid-attribute.s b/llvm/test/MC/RISCV/invalid-attribute.s
index c640fccd15ae5..b3d7cda73b35c 100644
--- a/llvm/test/MC/RISCV/invalid-attribute.s
+++ b/llvm/test/MC/RISCV/invalid-attribute.s
@@ -13,8 +13,11 @@
 .attribute arch, "foo"
 # CHECK: [[@LINE-1]]:18: error: invalid arch name 'foo', string must begin with rv32{i,e,g}, rv64{i,e,g}, or a supported profile name{{$}}
 
-.attribute arch, "rv32i2p1_y2p0"
-# CHECK: [[@LINE-1]]:18: error: invalid arch name 'rv32i2p1_y2p0', invalid standard user-level extension 'y'
+.attribute arch, "rv32i2p1_z2p0"
+# CHECK: [[@LINE-1]]:18: error: invalid arch name 'rv32i2p1_z2p0', standard user-level extension name missing after 'z'
+
+.attribute arch, "rv32i2p1_t2p0"
+# CHECK: [[@LINE-1]]:18: error: invalid arch name 'rv32i2p1_t2p0', unsupported standard user-level extension 't'
 
 .attribute stack_align, "16"
 # CHECK: [[@LINE-1]]:25: error: expected numeric constant

``````````

</details>


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


More information about the llvm-commits mailing list