Skip to content

Commit 692e887

Browse files
committed
[GlobalISel] Use some standard matchinfo defs. NFC.
1 parent 01e91a2 commit 692e887

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

llvm/include/llvm/Target/GlobalISel/Combine.td

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,8 @@ def shift_of_shifted_logic_chain : GICombineRule<
309309
[{ return Helper.matchShiftOfShiftedLogic(*${d}, ${matchinfo}); }]),
310310
(apply [{ Helper.applyShiftOfShiftedLogic(*${d}, ${matchinfo}); }])>;
311311

312-
def mul_to_shl_matchdata : GIDefMatchData<"unsigned">;
313312
def mul_to_shl : GICombineRule<
314-
(defs root:$d, mul_to_shl_matchdata:$matchinfo),
313+
(defs root:$d, unsigned_matchinfo:$matchinfo),
315314
(match (G_MUL $d, $op1, $op2):$mi,
316315
[{ return Helper.matchCombineMulToShl(*${mi}, ${matchinfo}); }]),
317316
(apply [{ Helper.applyCombineMulToShl(*${mi}, ${matchinfo}); }])>;
@@ -430,9 +429,8 @@ def select_undef_cmp: GICombineRule<
430429

431430
// Fold (true ? x : y) -> x
432431
// Fold (false ? x : y) -> y
433-
def select_constant_cmp_matchdata : GIDefMatchData<"unsigned">;
434432
def select_constant_cmp: GICombineRule<
435-
(defs root:$root, select_constant_cmp_matchdata:$matchinfo),
433+
(defs root:$root, unsigned_matchinfo:$matchinfo),
436434
(match (wip_match_opcode G_SELECT):$root,
437435
[{ return Helper.matchConstantSelectCmp(*${root}, ${matchinfo}); }]),
438436
(apply [{ Helper.replaceSingleDefInstWithOperand(*${root}, ${matchinfo}); }])
@@ -651,9 +649,8 @@ def add_p2i_to_ptradd : GICombineRule<
651649
>;
652650

653651
// Fold (ptr_add (int2ptr C1), C2) -> C1 + C2
654-
def const_ptradd_to_i2p_matchinfo : GIDefMatchData<"APInt">;
655652
def const_ptradd_to_i2p: GICombineRule<
656-
(defs root:$root, const_ptradd_to_i2p_matchinfo:$info),
653+
(defs root:$root, apint_matchinfo:$info),
657654
(match (wip_match_opcode G_PTR_ADD):$root,
658655
[{ return Helper.matchCombineConstPtrAddToI2P(*${root}, ${info}); }]),
659656
(apply [{ Helper.applyCombineConstPtrAddToI2P(*${root}, ${info}); }])
@@ -721,9 +718,8 @@ def anyext_trunc_fold: GICombineRule <
721718

722719
// Fold (zext (trunc x)) -> x if the source type is same as the destination type
723720
// and truncated bits are known to be zero.
724-
def zext_trunc_fold_matchinfo : GIDefMatchData<"Register">;
725721
def zext_trunc_fold: GICombineRule <
726-
(defs root:$root, zext_trunc_fold_matchinfo:$matchinfo),
722+
(defs root:$root, register_matchinfo:$matchinfo),
727723
(match (wip_match_opcode G_ZEXT):$root,
728724
[{ return Helper.matchCombineZextTrunc(*${root}, ${matchinfo}); }]),
729725
(apply [{ Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }])

llvm/lib/Target/AMDGPU/AMDGPUCombine.td

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,8 @@ def fmed3_intrinsic_to_clamp : GICombineRule<
9494
[{ return matchFPMed3ToClamp(*${fmed3}, ${matchinfo}); }]),
9595
(apply [{ applyClamp(*${fmed3}, ${matchinfo}); }])>;
9696

97-
def remove_fcanonicalize_matchinfo : GIDefMatchData<"Register">;
98-
9997
def remove_fcanonicalize : GICombineRule<
100-
(defs root:$fcanonicalize, remove_fcanonicalize_matchinfo:$matchinfo),
98+
(defs root:$fcanonicalize, register_matchinfo:$matchinfo),
10199
(match (wip_match_opcode G_FCANONICALIZE):$fcanonicalize,
102100
[{ return matchRemoveFcanonicalize(*${fcanonicalize}, ${matchinfo}); }]),
103101
(apply [{ Helper.replaceSingleDefInstWithReg(*${fcanonicalize}, ${matchinfo}); }])>;

0 commit comments

Comments
 (0)