File: select-usube.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (177 lines) | stat: -rw-r--r-- 6,774 bytes parent folder | download | duplicates (2)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -verify-machineinstrs -mtriple aarch64-unknown-uknown -global-isel-abort=1 -run-pass=instruction-select %s -o - | FileCheck %s
...
---
name:            usube_s64
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $x0, $x1

    ; CHECK-LABEL: name: usube_s64
    ; CHECK: liveins: $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
    ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
    ; CHECK-NEXT: [[SUBSWrr:%[0-9]+]]:gpr32 = SUBSWrr $wzr, [[MOVi32imm]], implicit-def $nzcv
    ; CHECK-NEXT: [[SBCSXr:%[0-9]+]]:gpr64 = SBCSXr [[COPY]], [[COPY1]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
    ; CHECK-NEXT: $x0 = COPY [[SBCSXr]]
    ; CHECK-NEXT: $w1 = COPY [[CSINCWr]]
    ; CHECK-NEXT: RET_ReallyLR implicit $x0, implicit $w1
    %0:gpr(s64) = COPY $x0
    %1:gpr(s64) = COPY $x1
    %2:gpr(s32) = G_CONSTANT i32 1
    %3:gpr(s64), %4:gpr(s32) = G_USUBE %0, %1, %2
    $x0 = COPY %3(s64)
    $w1 = COPY %4(s32)
    RET_ReallyLR implicit $x0, implicit $w1
...
...
---
name:            usube_s32
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $w0, $w1

    ; CHECK-LABEL: name: usube_s32
    ; CHECK: liveins: $w0, $w1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
    ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
    ; CHECK-NEXT: [[SUBSWrr:%[0-9]+]]:gpr32 = SUBSWrr $wzr, [[MOVi32imm]], implicit-def $nzcv
    ; CHECK-NEXT: [[SBCSWr:%[0-9]+]]:gpr32 = SBCSWr [[COPY]], [[COPY1]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
    ; CHECK-NEXT: $w0 = COPY [[SBCSWr]]
    ; CHECK-NEXT: $w1 = COPY [[CSINCWr]]
    ; CHECK-NEXT: RET_ReallyLR implicit $w0, implicit $w1
    %0:gpr(s32) = COPY $w0
    %1:gpr(s32) = COPY $w1
    %2:gpr(s32) = G_CONSTANT i32 1
    %3:gpr(s32), %4:gpr(s32) = G_USUBE %0, %1, %2
    $w0 = COPY %3(s32)
    $w1 = COPY %4(s32)
    RET_ReallyLR implicit $w0, implicit $w1
...
...
---
name:            usube_opt_prev_usubo
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $x0, $x1, $x2, $x3

    ; CHECK-LABEL: name: usube_opt_prev_usubo
    ; CHECK: liveins: $x0, $x1, $x2, $x3
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64 = COPY $x3
    ; CHECK-NEXT: [[SUBSXrr:%[0-9]+]]:gpr64 = SUBSXrr [[COPY]], [[COPY2]], implicit-def $nzcv
    ; CHECK-NEXT: [[SBCSXr:%[0-9]+]]:gpr64 = SBCSXr [[COPY1]], [[COPY3]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: $x0 = COPY [[SUBSXrr]]
    ; CHECK-NEXT: $x1 = COPY [[SBCSXr]]
    ; CHECK-NEXT: RET_ReallyLR implicit $x0, implicit $x1
    %0:gpr(s64) = COPY $x0
    %1:gpr(s64) = COPY $x1
    %2:gpr(s64) = COPY $x2
    %3:gpr(s64) = COPY $x3
    %8:gpr(s64), %12:gpr(s32) = G_USUBO %0, %2
    %9:gpr(s64), %13:gpr(s32) = G_USUBE %1, %3, %12
    $x0 = COPY %8(s64)
    $x1 = COPY %9(s64)
    RET_ReallyLR implicit $x0, implicit $x1
...
...
---
name:            usube_opt_prev_usube
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $x0, $x1, $x2, $x3

    ; CHECK-LABEL: name: usube_opt_prev_usube
    ; CHECK: liveins: $x0, $x1, $x2, $x3
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64 = COPY $x3
    ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
    ; CHECK-NEXT: [[SUBSWrr:%[0-9]+]]:gpr32 = SUBSWrr $wzr, [[MOVi32imm]], implicit-def $nzcv
    ; CHECK-NEXT: [[SBCSXr:%[0-9]+]]:gpr64 = SBCSXr [[COPY]], [[COPY2]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: [[SBCSXr1:%[0-9]+]]:gpr64 = SBCSXr [[COPY1]], [[COPY3]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: $x0 = COPY [[SBCSXr]]
    ; CHECK-NEXT: $x1 = COPY [[SBCSXr1]]
    ; CHECK-NEXT: RET_ReallyLR implicit $x0, implicit $x1
    %0:gpr(s64) = COPY $x0
    %1:gpr(s64) = COPY $x1
    %2:gpr(s64) = COPY $x2
    %3:gpr(s64) = COPY $x3
    %6:gpr(s32) = G_CONSTANT i32 1
    %8:gpr(s64), %12:gpr(s32) = G_USUBE %0, %2, %6
    %9:gpr(s64), %13:gpr(s32) = G_USUBE %1, %3, %12
    $x0 = COPY %8(s64)
    $x1 = COPY %9(s64)
    RET_ReallyLR implicit $x0, implicit $x1
...
...
---
name:            usube_opt_bail_clobber
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1:
    liveins: $x0, $x1, $x2, $x4, $x5, $x6

    ; CHECK-LABEL: name: usube_opt_bail_clobber
    ; CHECK: liveins: $x0, $x1, $x2, $x4, $x5, $x6
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64 = COPY $x4
    ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x5
    ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr64 = COPY $x6
    ; CHECK-NEXT: [[SUBSXrr:%[0-9]+]]:gpr64 = SUBSXrr [[COPY]], [[COPY3]], implicit-def $nzcv
    ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
    ; CHECK-NEXT: [[SBCSXr:%[0-9]+]]:gpr64 = SBCSXr [[COPY1]], [[COPY4]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: [[SUBSWrr:%[0-9]+]]:gpr32 = SUBSWrr $wzr, [[CSINCWr]], implicit-def $nzcv
    ; CHECK-NEXT: [[SBCSXr1:%[0-9]+]]:gpr64 = SBCSXr [[COPY2]], [[COPY5]], implicit-def $nzcv, implicit $nzcv
    ; CHECK-NEXT: $x0 = COPY [[SUBSXrr]]
    ; CHECK-NEXT: $x1 = COPY [[SBCSXr]]
    ; CHECK-NEXT: $x2 = COPY [[SBCSXr1]]
    ; CHECK-NEXT: RET_ReallyLR implicit $x0, implicit $x1, implicit $x2
    %0:gpr(s64) = COPY $x0
    %1:gpr(s64) = COPY $x1
    %2:gpr(s64) = COPY $x2
    %4:gpr(s64) = COPY $x4
    %5:gpr(s64) = COPY $x5
    %6:gpr(s64) = COPY $x6
    %7:gpr(s64), %11:gpr(s32) = G_USUBO %0, %4
    %8:gpr(s64), %12:gpr(s32) = G_USUBE %1, %5, %11
    ; carry-in is not produced by previous instruction
    %9:gpr(s64), %13:gpr(s32) = G_USUBE %2, %6, %11
    $x0 = COPY %7(s64)
    $x1 = COPY %8(s64)
    $x2 = COPY %9(s64)
    RET_ReallyLR implicit $x0, implicit $x1, implicit $x2
...