• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o - %s | FileCheck %s
2# REQUIRES: global-isel
3# This test ensures that the MIR parser parses generic virtual
4# register definitions correctly.
5
6--- |
7  ; ModuleID = 'generic-virtual-registers-type-error.mir'
8  target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
9  %type_alias = type <2 x i32>
10  %structure_alias = type { i32, i16 }
11  define void @bar() {
12  entry:
13    ret void
14  }
15
16...
17
18---
19name:            bar
20isSSA:           true
21# CHECK:      registers:
22# CHECK-NEXT:   - { id: 0, class: _ }
23# CHECK-NEXT:   - { id: 1, class: _ }
24# CHECK-NEXT:   - { id: 2, class: _ }
25# CHECK-NEXT:   - { id: 3, class: _ }
26# CHECK-NEXT:   - { id: 4, class: _ }
27registers:
28  - { id: 0, class: _ }
29  - { id: 1, class: _ }
30  - { id: 2, class: _ }
31  - { id: 3, class: _ }
32  - { id: 4, class: _ }
33body: |
34  bb.0.entry:
35    liveins: %edi
36    ; CHECK:      %0(32) = G_ADD i32 %edi
37    %0(32) = G_ADD i32 %edi, %edi
38    ; CHECK:      %1(64) = G_ADD <2 x i32> %edi
39    %1(64) = G_ADD <2 x i32> %edi, %edi
40    ; CHECK:      %2(64) = G_ADD <2 x i32> %edi
41    %2(64) = G_ADD %type_alias %edi, %edi
42    ; G_ADD is actually not a valid operand for structure type,
43    ; but that is the only one we have for now for testing.
44    ; CHECK:      %3(64) = G_ADD { i32, i32 } %edi
45    %3(64) = G_ADD {i32, i32} %edi, %edi
46    ; CHECK:      %4(48) = G_ADD %structure_alias %edi
47    %4(48) = G_ADD %structure_alias %edi, %edi
48...
49