[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / PowerPC / invalid-instructions-spellcheck.s
blobcbf761f83fde01bb0f8a5aa5897ebe1d1a69f96b
1 # RUN: not llvm-mc -triple powerpc-unknown-unknown < %s 2>&1 | FileCheck %s
3 # This tests the mnemonic spell checker.
5 # First check what happens when an instruction is omitted:
7 %r1, %r2, %r3
9 # CHECK: error: unexpected token at start of statement
10 # CHECK-NEXT: %r1, %r2, %r3
11 # CHECK-NEXT: ^
13 # We don't want to see a suggestion here; the edit distance is too large to
14 # give sensible suggestions:
16 aaaaaaaaaaaaaaa %r1, %r2, %r3
18 # CHECK: error: invalid instruction
19 # CHECK-NEXT: aaaaaaaaaaaaaaa %r1, %r2, %r3
20 # CHECK-NEXT: ^
22 # Check that we get one suggestion: 'vmaxfpg' is 1 edit away, i.e. an deletion.
24 vmaxfpg %r1, %r2
26 # CHECK: error: invalid instruction, did you mean: vmaxfp?
27 # CHECK-NEXT: vmaxfpg %r1, %r2
28 # CHECK-NEXT: ^
30 # Check edit distance 1 and 2, just insertions:
32 xsnmsubad %r1, %r2
34 # CHECK: error: invalid instruction, did you mean: xsmsubadp, xsnmsubadp?
35 # CHECK-NEXT: xsnmsubad %r1, %r2
36 # CHECK-NEXT: ^
38 # Check an instruction that is 2 edits away, and also has a lot of candidates:
40 adXd %r1, %r2, %r3
42 # CHECK: error: invalid instruction, did you mean: add, addc, adde, addi, fadd?
43 # CHECK-NEXT: adXd %r1, %r2, %r3
44 # CHECK-NEXT: ^