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
|
# SPDX-License-Identifier: GPL-3.0-or-later
combiner_rules:
-
id: combine_nneg_zext
priority: 500
match:
opcode: G_ZEXT
result_type: { kind: scalar, bits: 64 }
operand_types:
- { index: 1, kind: scalar, bits: 32 }
target_predicates: [sext_cheaper_than_zext]
flags: [nneg]
def_use:
-
operand: 1
opcode: G_TRUNC
captures:
- { id: source, operand: 1 }
- { id: trunc_result, operand: 0 }
apply:
action: mutate_root
opcode: G_SEXT_INREG
operands:
- { operand: 0 }
- { captured_operand: source }
- { captured_type_bits: trunc_result }
clear_flags: [nneg]
erase_operand_definitions: [1]
-
id: combine_shl_zero
priority: 100
match:
opcode: G_SHL
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_lshr_zero
priority: 100
match:
opcode: G_LSHR
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_ashr_zero
priority: 100
match:
opcode: G_ASHR
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_sdiv_zero
priority: 100
match:
opcode: G_SDIV
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_udiv_zero
priority: 100
match:
opcode: G_UDIV
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_srem_zero
priority: 100
match:
opcode: G_SREM
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_urem_zero
priority: 100
match:
opcode: G_UREM
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
-
id: combine_mul_zero
priority: 100
match:
opcode: G_MUL
def_use:
-
operand: 1
opcode: G_CONSTANT
captures:
- { id: zero, operand: 0 }
operand_def_constants:
- index: 1
ranges: [{ min: 0, max: 0 }]
apply:
action: replace_root_with_capture
capture: zero
erase_operand_definitions: [1]
|