mirnamer.mir
3.24 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# RUN: llc -x mir -mtriple aarch64-apple-ios -run-pass mir-namer -verify-machineinstrs -o - < %s | FileCheck %s
---
name: foo
body: |
bb.0:
;CHECK-LABEL: bb.0
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:_(p0) = COPY $d0
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:_(<4 x s32>) = COPY $q0
;CHECK-NEXT: G_STORE %bb0_{{[0-9]+}}__1(<4 x s32>), %bb0_{{[0-9]+}}__1(p0) :: (store 16)
liveins: $q0, $d0
%1:fpr(p0) = COPY $d0
%0:fpr(<4 x s32>) = COPY $q0
G_STORE %0(<4 x s32>), %1(p0) :: (store 16)
...
---
name: bar
stack:
- { id: 0, type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: -4, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
body: |
bb.0:
;CHECK-LABEL: bb.0
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = LDRWui
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 1
;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = LDRWui
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 2
;CHECK-NEXT: %bb0_{{[0-9]+}}__3:gpr32 = LDRWui
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 3
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = nsw ADDWrr
;CHECK-NEXT: %bb0_{{[0-9]+}}__4:gpr32 = LDRWui
;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = nsw ADDWrr
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 4
;CHECK-NEXT: %bb0_{{[0-9]+}}__3:gpr32 = nsw ADDWrr
;CHECK-NEXT: %bb0_{{[0-9]+}}__5:gpr32 = LDRWui
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = MOVi32imm 5
%0:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%1:gpr32 = MOVi32imm 1
%2:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%3:gpr32 = MOVi32imm 2
%4:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%5:gpr32 = MOVi32imm 3
%10:gpr32 = nsw ADDWrr %0:gpr32, %1:gpr32
%6:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%11:gpr32 = nsw ADDWrr %2:gpr32, %3:gpr32
%7:gpr32 = MOVi32imm 4
%12:gpr32 = nsw ADDWrr %4:gpr32, %5:gpr32
%8:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%9:gpr32 = MOVi32imm 5
%13:gpr32 = nsw ADDWrr %6:gpr32, %7:gpr32
%14:gpr32 = nsw ADDWrr %8:gpr32, %9:gpr32
%15:gpr32 = nsw ADDWrr %10:gpr32, %11:gpr32
%16:gpr32 = nsw ADDWrr %12:gpr32, %13:gpr32
%17:gpr32 = nsw ADDWrr %14:gpr32, %15:gpr32
%18:gpr32 = nsw ADDWrr %16:gpr32, %17:gpr32
$w0 = COPY %18
RET_ReallyLR implicit $w0
...
---
name: baz
stack:
- { id: 0, type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: -4, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
body: |
bb.0:
liveins: $x0, $x1, $d0, $d1
;CHECK-LABEL: bb.0:
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = LDRWui %stack.0, 0
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = COPY %bb0_{{[0-9]+}}__1
;CHECK-NEXT: %bb0_{{[0-9]+}}__1:gpr32 = COPY %bb0_{{[0-9]+}}__1
;CHECK-NEXT: %bb0_{{[0-9]+}}__2:gpr32 = COPY %bb0_{{[0-9]+}}__1
;CHECK-NEXT: $w0 = COPY %bb0_{{[0-9]+}}__2
%0:gpr32 = LDRWui %stack.0, 0 :: (dereferenceable load 8)
%1:gpr32 = COPY %0
%2:gpr32 = COPY %1
%3:gpr32 = COPY %2
$w0 = COPY %3
RET_ReallyLR implicit $w0
...