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:
9 # CHECK: error: unexpected token at start of statement
10 # CHECK-NEXT: %r1, %r2, %r3
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
22 # Check that we get one suggestion: 'vmaxfpg' is 1 edit away, i.e. an deletion.
26 # CHECK: error: invalid instruction, did you mean: vmaxfp?
27 # CHECK-NEXT: vmaxfpg %r1, %r2
30 # Check edit distance 1 and 2, just insertions:
34 # CHECK: error: invalid instruction, did you mean: xsmsubadp, xsnmsubadp?
35 # CHECK-NEXT: xsnmsubad %r1, %r2
38 # Check an instruction that is 2 edits away, and also has a lot of candidates:
42 # CHECK: error: invalid instruction, did you mean: add, addc, adde, addi, fadd?
43 # CHECK-NEXT: adXd %r1, %r2, %r3