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