[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / SystemZ / invalid-instructions-spellcheck.s
blobe77b99d9a3875cd7f14dda839ccc34efe7d3350d
1 # RUN: not llvm-mc -triple=systemz -mcpu=z13 -show-encoding < %s 2>&1 | FileCheck %s
2 # RUN: not llvm-mc -triple=systemz -mcpu=zEC12 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ZEC12
4 # This tests the mnemonic spell checker.
6 # First check what happens when an instruction is omitted:
8 %r1, %r2, %r3
10 # CHECK: error: unexpected token at start of statement
11 # CHECK-NEXT: %r1, %r2, %r3
12 # CHECK-NEXT: ^
14 # We don't want to see a suggestion here; the edit distance is too large to
15 # give sensible suggestions:
17 aaaaaaaaaaaaaaa %r1, %r2, %r3
19 # CHECK: error: invalid instruction
20 # CHECK-NEXT: aaaaaaaaaaaaaaa %r1, %r2, %r3
21 # CHECK-NEXT: ^
23 # Check that we get one suggestion: 'cpdt' is 1 edit away, i.e. an deletion.
25 cpdtX %r1, 0(4, %r15), 0
27 #CHECK: error: invalid instruction, did you mean: cpdt
28 #CHECK-NEXT: cpdtX %r1, 0(4, %r15), 0
29 #CHECK-NEXT: ^
31 # Check edit distance 1 and 2
33 ltTr %r1, %r2
35 # CHECK: error: invalid instruction, did you mean: lr, lt, ltdr, ltdtr, lter, ltgr, ltr, ltxr, ltxtr, tr, trtr?
36 # CHECK-NEXT: ltTr %r1, %r2
37 # CHECK-NEXT: ^
39 # Check edit distance 1 and 2, just insertions:
41 begin 0, 65292
43 # CHECK: error: invalid instruction, did you mean: tbegin, tbeginc?
44 # CHECK-NEXT: begin 0, 65292
45 # CHECK-NEXT: ^
47 # Check an instruction that is 2 edits away, and also has a lot of candidates:
49 adt %r1, 244(%r15)
51 # CHECK: error: invalid instruction, did you mean: a, ad, adb, adr, adtr, adtra, d, lat, mad, qadtr?
52 # CHECK-NEXT: adt %r1, 244(%r15)
53 # CHECK-NEXT: ^
55 # Here it is checked that we don't suggest instructions that are not supported.
56 # For example, in pre-z13 mode we don't want to see suggestions for vector instructions.
58 vlvggp %v1, %r2, %r3
60 # CHECK-ZEC12: error: invalid instruction
61 # CHECK-ZEC12: vlvggp
62 # CHECK-ZEC12: ^
64 # CHECK: error: invalid instruction, did you mean: vlvg, vlvgg, vlvgp?
65 # CHECK-NEXT: vlvggp %v1, %r2, %r3
66 # CHECK-NEXT: ^