@@ -89,10 +89,6 @@ def match;
89
89
class GIMatchKind;
90
90
class GIMatchKindWithArgs;
91
91
92
- /// In lieu of having proper macro support. Trivial one-off opcode checks can be
93
- /// performed with this.
94
- def wip_match_opcode : GIMatchKindWithArgs;
95
-
96
92
/// The operator at the root of a GICombineRule.Apply dag.
97
93
def apply;
98
94
/// All arguments of the apply operator must be subclasses of GIApplyKind, or
@@ -103,30 +99,26 @@ class GIApplyKindWithArgs;
103
99
104
100
def copy_prop : GICombineRule<
105
101
(defs root:$d),
106
- (match (COPY $d, $s):$mi,
107
- [{ return Helper.matchCombineCopy(*${mi}); }]),
108
- (apply [{ Helper.applyCombineCopy(*${mi}); }])>;
102
+ (match [{ return Helper.matchCombineCopy(${d}); }]),
103
+ (apply [{ Helper.applyCombineCopy(${d}); }])>;
109
104
def trivial_combines : GICombineGroup<[copy_prop]>;
110
105
111
106
def extending_loads : GICombineRule<
112
107
(defs root:$root, extending_load_matchdata:$matchinfo),
113
- (match (wip_match_opcode G_LOAD, G_SEXTLOAD, G_ZEXTLOAD):$root,
114
- [{ return Helper.matchCombineExtendingLoads(*${root}, ${matchinfo}); }]),
115
- (apply [{ Helper.applyCombineExtendingLoads(*${root}, ${matchinfo}); }])>;
108
+ (match [{ return Helper.matchCombineExtendingLoads(${root}, ${matchinfo}); }]),
109
+ (apply [{ Helper.applyCombineExtendingLoads(${root}, ${matchinfo}); }])>;
116
110
def combines_for_extload: GICombineGroup<[extending_loads]>;
117
111
118
112
def combine_indexed_load_store : GICombineRule<
119
113
(defs root:$root, indexed_load_store_matchdata:$matchinfo),
120
- (match (wip_match_opcode G_LOAD, G_SEXTLOAD, G_ZEXTLOAD, G_STORE):$root,
121
- [{ return Helper.matchCombineIndexedLoadStore(*${root}, ${matchinfo}); }]),
122
- (apply [{ Helper.applyCombineIndexedLoadStore(*${root}, ${matchinfo}); }])>;
114
+ (match [{ return Helper.matchCombineIndexedLoadStore(${root}, ${matchinfo}); }]),
115
+ (apply [{ Helper.applyCombineIndexedLoadStore(${root}, ${matchinfo}); }])>;
123
116
124
117
// FIXME: Is there a reason this wasn't in tryCombine? I've left it out of
125
118
// all_combines because it wasn't there.
126
119
def elide_br_by_inverting_cond : GICombineRule<
127
- (defs root:$root),
128
- (match (wip_match_opcode G_BR):$root,
129
- [{ return Helper.matchElideBrByInvertingCond(*${root}); }]),
130
- (apply [{ Helper.applyElideBrByInvertingCond(*${root}); }])>;
120
+ (defs root:$d),
121
+ (match [{ return Helper.matchElideBrByInvertingCond(${d}); }]),
122
+ (apply [{ Helper.applyElideBrByInvertingCond(${d}); }])>;
131
123
132
124
def all_combines : GICombineGroup<[trivial_combines, combines_for_extload, combine_indexed_load_store]>;
0 commit comments