[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / invalid-instructions-spellcheck.s
blob8acb285ac9a6db1ce5ca5d2cd8e99d58dd2c9d84
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 | FileCheck %s
2 // RUN: not llvm-mc -triple=aarch64 -mattr=-neon -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-NEON
4 // This tests the mnemonic spell checker.
6 // First check what happens when an instruction is omitted:
8 w1, w2, w3
10 // CHECK: error: unknown token in expression
11 // CHECK-NEXT: w1, w2, w3
12 // CHECK-NEXT: ^
13 // CHECK-NEXT: error: invalid operand
14 // CHECK-NEXT: w1, w2, w3
15 // CHECK-NEXT: ^
17 // We don't want to see a suggestion here; the edit distance is too large to
18 // give sensible suggestions:
20 addddddddd w1, w2, w3
22 // CHECK: error: unrecognized instruction mnemonic
23 // CHECK-NEXT: addddddddd w1, w2, w3
24 // CHECK-NEXT: ^
26 addd w1, w2, w3
28 // CHECK: error: unrecognized instruction mnemonic, did you mean: add, addp, adds, addv, fadd, madd?
29 // CHECK-NEXT: addd w1, w2, w3
30 // CHECK-NEXT: ^
32 // Instructions 'addv' and 'addp' are only available when NEON is enabled, so we
33 // don't want to see them here:
35 // CHECK-NO-NEON: error: unrecognized instruction mnemonic, did you mean: add, adds, fadd, madd?
36 // CHECK-NO-NEON-NEXT: addd w1, w2, w3
37 // CHECK-NO-NEON-NEXT: ^