Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / option-invalid.s
blob683ebc4f5b99239f8ff07c6324fb64e93bd56c3e
1 # RUN: not llvm-mc -triple riscv32 < %s 2>&1 \
2 # RUN: | FileCheck --implicit-check-not=error: %s
4 # CHECK: :[[#@LINE+1]]:8: error: expected identifier
5 .option
7 # CHECK: :[[#@LINE+1]]:9: error: expected identifier
8 .option 123
10 # CHECK: :[[#@LINE+1]]:9: error: expected identifier
11 .option "str"
13 # CHECK: :[[#@LINE+1]]:13: error: expected newline
14 .option rvc foo
16 # CHECK: :[[#@LINE+1]]:23: error: unexpected token, expected + or -
17 .option arch, +f, +d, rv32ifd, -d
19 # CHECK: :[[#@LINE+1]]:22: error: expected newline
20 .option arch, rv32ifd, +f, +d
22 # CHECK: :[[#@LINE+1]]:16: error: unexpected token, expected identifier
23 .option arch, +"c"
25 # CHECK: :[[#@LINE+1]]:16: error: unknown extension feature
26 .option arch, +x
28 # CHECK: :[[#@LINE+1]]:16: error: unknown extension feature
29 .option arch, +relax
31 # CHECK: :[[#@LINE+1]]:16: error: unexpected token, expected identifier
32 .option arch, +
34 # CHECK: :[[#@LINE+1]]:18: error: expected comma
35 .option arch, +c foo
37 # CHECK: :[[#@LINE+1]]:16: error: Extension version number parsing not currently implemented
38 .option arch, +c2p0
40 .option arch, +d
41 # CHECK: :[[#@LINE+1]]:16: error: Can't disable f extension, d extension requires f extension be enabled
42 .option arch, -f
44 # CHECK: :[[#@LINE+1]]:16: error: Can't disable zicsr extension, f extension requires zicsr extension be enabled
45 .option arch, -zicsr
47 # CHECK: :[[#@LINE+1]]:20: error: 'f' and 'zfinx' extensions are incompatible
48 .option arch, +f, +zfinx
50 ## Make sure the above error isn't sticky
51 .option arch, +f
53 # CHECK: :[[#@LINE+1]]:13: error: expected newline
54 .option rvc foo
56 # CHECK: :[[#@LINE+1]]:12: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax'
57 .option bar
59 # CHECK: :[[#@LINE+1]]:16: error: unknown extension feature
60 .option arch, -i
62 # CHECK: :[[#@LINE+1]]:12: error: .option pop with no .option push
63 .option pop
65 # CHECK: :[[#@LINE+1]]:14: error: expected newline
66 .option push 123
68 # CHECK: :[[#@LINE+1]]:13: error: expected newline
69 .option pop 123
71 # CHECK: :[[#@LINE+1]]:15: error: bad arch string switching from rv32 to rv64
72 .option arch, rv64gc