@@ -13,14 +13,14 @@ include "llvm/Target/GlobalISel/Combine.td"
13
13
14
14
def fconstant_to_constant : GICombineRule<
15
15
(defs root:$root),
16
- (match (wip_match_opcode G_FCONSTANT):$root,
16
+ (match (G_FCONSTANT $dst, $src ):$root,
17
17
[{ return matchFConstantToConstant(*${root}, MRI); }]),
18
18
(apply [{ applyFConstantToConstant(*${root}); }])>;
19
19
20
20
def icmp_redundant_trunc_matchdata : GIDefMatchData<"Register">;
21
21
def icmp_redundant_trunc : GICombineRule<
22
22
(defs root:$root, icmp_redundant_trunc_matchdata:$matchinfo),
23
- (match (wip_match_opcode G_ICMP):$root,
23
+ (match (G_ICMP $dst, $tst, $src1, $src2 ):$root,
24
24
[{ return matchICmpRedundantTrunc(*${root}, MRI, Helper.getKnownBits(), ${matchinfo}); }]),
25
25
(apply [{ applyICmpRedundantTrunc(*${root}, MRI, B, Observer, ${matchinfo}); }])>;
26
26
@@ -178,14 +178,14 @@ def adjust_icmp_imm_matchdata :
178
178
GIDefMatchData<"std::pair<uint64_t, CmpInst::Predicate>">;
179
179
def adjust_icmp_imm : GICombineRule <
180
180
(defs root:$root, adjust_icmp_imm_matchdata:$matchinfo),
181
- (match (wip_match_opcode G_ICMP):$root,
181
+ (match (G_ICMP $dst, $tst, $src1, $src2 ):$root,
182
182
[{ return matchAdjustICmpImmAndPred(*${root}, MRI, ${matchinfo}); }]),
183
183
(apply [{ applyAdjustICmpImmAndPred(*${root}, ${matchinfo}, B, Observer); }])
184
184
>;
185
185
186
186
def swap_icmp_operands : GICombineRule <
187
187
(defs root:$root),
188
- (match (wip_match_opcode G_ICMP):$root,
188
+ (match (G_ICMP $dst, $tst, $src1, $src2 ):$root,
189
189
[{ return trySwapICmpOperands(*${root}, MRI); }]),
190
190
(apply [{ applySwapICmpOperands(*${root}, Observer); }])
191
191
>;
@@ -226,14 +226,14 @@ def build_vector_lowering : GICombineGroup<[build_vector_to_dup]>;
226
226
227
227
def lower_vector_fcmp : GICombineRule<
228
228
(defs root:$root),
229
- (match (wip_match_opcode G_FCMP):$root,
229
+ (match (G_FCMP $dst, $tst, $src1, $src2 ):$root,
230
230
[{ return matchLowerVectorFCMP(*${root}, MRI, B); }]),
231
231
(apply [{ applyLowerVectorFCMP(*${root}, MRI, B); }])>;
232
232
233
233
def form_truncstore_matchdata : GIDefMatchData<"Register">;
234
234
def form_truncstore : GICombineRule<
235
235
(defs root:$root, form_truncstore_matchdata:$matchinfo),
236
- (match (wip_match_opcode G_STORE):$root,
236
+ (match (G_STORE $src, $addr ):$root,
237
237
[{ return matchFormTruncstore(*${root}, MRI, ${matchinfo}); }]),
238
238
(apply [{ applyFormTruncstore(*${root}, MRI, B, Observer, ${matchinfo}); }])
239
239
>;
@@ -254,7 +254,7 @@ def mutate_anyext_to_zext : GICombineRule<
254
254
255
255
def split_store_zero_128 : GICombineRule<
256
256
(defs root:$d),
257
- (match (wip_match_opcode G_STORE):$d,
257
+ (match (G_STORE $src, $addr ):$d,
258
258
[{ return matchSplitStoreZero128(*${d}, MRI); }]),
259
259
(apply [{ applySplitStoreZero128(*${d}, MRI, B, Observer); }])
260
260
>;
@@ -277,7 +277,7 @@ def unmerge_ext_to_unmerge : GICombineRule<
277
277
def regtriple_matchdata : GIDefMatchData<"std::tuple<Register, Register, Register>">;
278
278
def or_to_bsp: GICombineRule <
279
279
(defs root:$root, regtriple_matchdata:$matchinfo),
280
- (match (wip_match_opcode G_OR):$root,
280
+ (match (G_OR $dst, $src1, $src2 ):$root,
281
281
[{ return matchOrToBSP(*${root}, MRI, ${matchinfo}); }]),
282
282
(apply [{ applyOrToBSP(*${root}, MRI, B, ${matchinfo}); }])
283
283
>;
0 commit comments