Skip to content

Commit df159d3

Browse files
authored
[GISEL][AArch64][NFC] Stop using wip_match_opcode for some opcodes (#106702)
This patch moves to the new style of writing pattern for matching opcodes and thus deprecates using wip_match_opcoee. It moves G_FCONSTANT, G_ICMP, G_STORE, and G_OR.
1 parent f70ccda commit df159d3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Target/AArch64/AArch64Combine.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ include "llvm/Target/GlobalISel/Combine.td"
1313

1414
def fconstant_to_constant : GICombineRule<
1515
(defs root:$root),
16-
(match (wip_match_opcode G_FCONSTANT):$root,
16+
(match (G_FCONSTANT $dst, $src):$root,
1717
[{ return matchFConstantToConstant(*${root}, MRI); }]),
1818
(apply [{ applyFConstantToConstant(*${root}); }])>;
1919

2020
def icmp_redundant_trunc_matchdata : GIDefMatchData<"Register">;
2121
def icmp_redundant_trunc : GICombineRule<
2222
(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,
2424
[{ return matchICmpRedundantTrunc(*${root}, MRI, Helper.getKnownBits(), ${matchinfo}); }]),
2525
(apply [{ applyICmpRedundantTrunc(*${root}, MRI, B, Observer, ${matchinfo}); }])>;
2626

@@ -178,14 +178,14 @@ def adjust_icmp_imm_matchdata :
178178
GIDefMatchData<"std::pair<uint64_t, CmpInst::Predicate>">;
179179
def adjust_icmp_imm : GICombineRule <
180180
(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,
182182
[{ return matchAdjustICmpImmAndPred(*${root}, MRI, ${matchinfo}); }]),
183183
(apply [{ applyAdjustICmpImmAndPred(*${root}, ${matchinfo}, B, Observer); }])
184184
>;
185185

186186
def swap_icmp_operands : GICombineRule <
187187
(defs root:$root),
188-
(match (wip_match_opcode G_ICMP):$root,
188+
(match (G_ICMP $dst, $tst, $src1, $src2):$root,
189189
[{ return trySwapICmpOperands(*${root}, MRI); }]),
190190
(apply [{ applySwapICmpOperands(*${root}, Observer); }])
191191
>;
@@ -226,14 +226,14 @@ def build_vector_lowering : GICombineGroup<[build_vector_to_dup]>;
226226

227227
def lower_vector_fcmp : GICombineRule<
228228
(defs root:$root),
229-
(match (wip_match_opcode G_FCMP):$root,
229+
(match (G_FCMP $dst, $tst, $src1, $src2):$root,
230230
[{ return matchLowerVectorFCMP(*${root}, MRI, B); }]),
231231
(apply [{ applyLowerVectorFCMP(*${root}, MRI, B); }])>;
232232

233233
def form_truncstore_matchdata : GIDefMatchData<"Register">;
234234
def form_truncstore : GICombineRule<
235235
(defs root:$root, form_truncstore_matchdata:$matchinfo),
236-
(match (wip_match_opcode G_STORE):$root,
236+
(match (G_STORE $src, $addr):$root,
237237
[{ return matchFormTruncstore(*${root}, MRI, ${matchinfo}); }]),
238238
(apply [{ applyFormTruncstore(*${root}, MRI, B, Observer, ${matchinfo}); }])
239239
>;
@@ -254,7 +254,7 @@ def mutate_anyext_to_zext : GICombineRule<
254254

255255
def split_store_zero_128 : GICombineRule<
256256
(defs root:$d),
257-
(match (wip_match_opcode G_STORE):$d,
257+
(match (G_STORE $src, $addr):$d,
258258
[{ return matchSplitStoreZero128(*${d}, MRI); }]),
259259
(apply [{ applySplitStoreZero128(*${d}, MRI, B, Observer); }])
260260
>;
@@ -277,7 +277,7 @@ def unmerge_ext_to_unmerge : GICombineRule<
277277
def regtriple_matchdata : GIDefMatchData<"std::tuple<Register, Register, Register>">;
278278
def or_to_bsp: GICombineRule <
279279
(defs root:$root, regtriple_matchdata:$matchinfo),
280-
(match (wip_match_opcode G_OR):$root,
280+
(match (G_OR $dst, $src1, $src2):$root,
281281
[{ return matchOrToBSP(*${root}, MRI, ${matchinfo}); }]),
282282
(apply [{ applyOrToBSP(*${root}, MRI, B, ${matchinfo}); }])
283283
>;

0 commit comments

Comments
 (0)