Skip to content

Commit 3f0d3fd

Browse files
committed
[clang][test][RISCV] Add simple litmus test for --print-enabled-extensions
There's some coverage in RISCVISAInfoTest, but it's worth adding a quick test to ensure nothing happens to the frontend handling of this option.
1 parent 340be6c commit 3f0d3fd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// REQUIRES: riscv-registered-target
2+
// RUN: %clang --target=riscv64 --print-enabled-extensions -mcpu=rocket-rv64 | FileCheck --strict-whitespace %s
3+
4+
// Simple litmus test to check the frontend handling of this option is
5+
// enabled.
6+
7+
// CHECK: Extensions enabled for the given RISC-V target
8+
// CHECK-EMPTY:
9+
// CHECK-NEXT: Name Version Description
10+
// CHECK-NEXT: i 2.1 'I' (Base Integer Instruction Set)
11+
// CHECK-NEXT: zicsr 2.0 'zicsr' (CSRs)
12+
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
13+
// CHECK-EMPTY:

0 commit comments

Comments
 (0)