MIR Serialization: Serialize the sub register indices.
[oota-llvm.git] / test / CodeGen / MIR / X86 / unknown-subregister-index.mir
1 # RUN: not llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o /dev/null %s 2>&1 | FileCheck %s
2 # This test ensures that an error is reported when an unknown subregister index
3 # is encountered.
4
5 --- |
6
7   define zeroext i1 @t(i1 %c) {
8   entry:
9     ret i1 %c
10   }
11
12 ...
13 ---
14 name:            t
15 isSSA:           true
16 tracksRegLiveness: true
17 registers:
18   - { id: 0, class: gr32 }
19   - { id: 1, class: gr8 }
20   - { id: 2, class: gr8 }
21 body:
22   - name:        entry
23     id:          0
24     instructions:
25       - '%0 = COPY %edi'
26       # CHECK: [[@LINE+1]]:23: use of unknown subregister index 'bit8'
27       - '%1 = COPY %0:bit8'
28       - '%2 = AND8ri %1, 1, implicit-def %eflags'
29       - '%al = COPY %2'
30       - 'RETQ %al'
31 ...