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 3 4// This tests the mnemonic spell checker. 5 6// First check what happens when an instruction is omitted: 7 8 w1, w2, w3 9 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: ^ 16 17// We don't want to see a suggestion here; the edit distance is too large to 18// give sensible suggestions: 19 20 addddddddd w1, w2, w3 21 22// CHECK: error: unrecognized instruction mnemonic 23// CHECK-NEXT: addddddddd w1, w2, w3 24// CHECK-NEXT: ^ 25 26 addd w1, w2, w3 27 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: ^ 31 32// Instructions 'addv' and 'addp' are only available when NEON is enabled, so we 33// don't want to see them here: 34 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: ^ 38