xref: /llvm-project/llvm/test/MachineVerifier/verify-selected.mir (revision 4ad76852584480b646d1ce360202e18591ea8938)
1# RUN: not --crash llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
2# REQUIRES: aarch64-registered-target
3
4--- |
5
6  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7  target triple = "aarch64--"
8  define void @test() { ret void }
9
10...
11
12---
13name:            test
14regBankSelected: true
15selected: true
16registers:
17  - { id: 0, class: gpr64 }
18  - { id: 1, class: gpr64 }
19  - { id: 2, class: gpr }
20body: |
21  bb.0:
22   liveins: $x0
23   %0 = COPY $x0
24
25   ; CHECK: *** Bad machine code: Unexpected generic instruction in a Selected function ***
26   ; CHECK: instruction: %1:gpr64 = G_ADD
27   %1 = G_ADD %0, %0
28
29   ; CHECK: *** Bad machine code: Generic virtual register invalid in a Selected function ***
30   ; CHECK: instruction: %2:gpr(s64) = COPY
31   ; CHECK: operand 0: %2
32   %2(s64) = COPY $x0
33...
34