@@ -211,6 +211,7 @@ def constantfp_matchinfo : GIDefMatchData<"ConstantFP*">;
211
211
def build_fn_matchinfo :
212
212
GIDefMatchData<"std::function<void(MachineIRBuilder &)>">;
213
213
def unsigned_matchinfo: GIDefMatchData<"unsigned">;
214
+ def register_vector_matchinfo : GIDefMatchData<"SmallVector<Register>">;
214
215
215
216
def copy_prop : GICombineRule<
216
217
(defs root:$d),
@@ -811,9 +812,8 @@ def zext_trunc_fold: GICombineRule <
811
812
(apply [{ Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }])
812
813
>;
813
814
814
- def not_cmp_fold_matchinfo : GIDefMatchData<"SmallVector<Register, 4>">;
815
815
def not_cmp_fold : GICombineRule<
816
- (defs root:$d, not_cmp_fold_matchinfo :$info),
816
+ (defs root:$d, register_vector_matchinfo :$info),
817
817
(match (wip_match_opcode G_XOR): $d,
818
818
[{ return Helper.matchNotCmp(*${d}, ${info}); }]),
819
819
(apply [{ Helper.applyNotCmp(*${d}, ${info}); }])
@@ -828,9 +828,8 @@ def fneg_fneg_fold: GICombineRule <
828
828
>;
829
829
830
830
// Fold (unmerge(merge x, y, z)) -> z, y, z.
831
- def unmerge_merge_matchinfo : GIDefMatchData<"SmallVector<Register, 8>">;
832
831
def unmerge_merge : GICombineRule<
833
- (defs root:$d, unmerge_merge_matchinfo :$info),
832
+ (defs root:$d, register_vector_matchinfo :$info),
834
833
(match (wip_match_opcode G_UNMERGE_VALUES): $d,
835
834
[{ return Helper.matchCombineUnmergeMergeToPlainValues(*${d}, ${info}); }]),
836
835
(apply [{ Helper.applyCombineUnmergeMergeToPlainValues(*${d}, ${info}); }])
@@ -955,9 +954,8 @@ def ptr_add_with_zero: GICombineRule<
955
954
[{ return Helper.matchPtrAddZero(*${root}); }]),
956
955
(apply [{ Helper.applyPtrAddZero(*${root}); }])>;
957
956
958
- def regs_small_vec : GIDefMatchData<"SmallVector<Register, 4>">;
959
957
def combine_insert_vec_elts_build_vector : GICombineRule<
960
- (defs root:$root, regs_small_vec :$info),
958
+ (defs root:$root, register_vector_matchinfo :$info),
961
959
(match (wip_match_opcode G_INSERT_VECTOR_ELT):$root,
962
960
[{ return Helper.matchCombineInsertVecElts(*${root}, ${info}); }]),
963
961
(apply [{ Helper.applyCombineInsertVecElts(*${root}, ${info}); }])>;
@@ -1553,9 +1551,8 @@ def nneg_zext : GICombineRule<
1553
1551
(apply [{ Helper.applyBuildFnMO(${root}, ${matchinfo}); }])>;
1554
1552
1555
1553
// Combines concat operations
1556
- def concat_matchinfo : GIDefMatchData<"SmallVector<Register>">;
1557
1554
def combine_concat_vector : GICombineRule<
1558
- (defs root:$root, concat_matchinfo :$matchinfo),
1555
+ (defs root:$root, register_vector_matchinfo :$matchinfo),
1559
1556
(match (wip_match_opcode G_CONCAT_VECTORS):$root,
1560
1557
[{ return Helper.matchCombineConcatVectors(*${root}, ${matchinfo}); }]),
1561
1558
(apply [{ Helper.applyCombineConcatVectors(*${root}, ${matchinfo}); }])>;
@@ -1567,7 +1564,7 @@ def combine_concat_vector : GICombineRule<
1567
1564
// ===>
1568
1565
// c = G_CONCAT_VECTORS x, y, z, undef
1569
1566
def combine_shuffle_concat : GICombineRule<
1570
- (defs root:$root, concat_matchinfo :$matchinfo),
1567
+ (defs root:$root, register_vector_matchinfo :$matchinfo),
1571
1568
(match (wip_match_opcode G_SHUFFLE_VECTOR):$root,
1572
1569
[{ return Helper.matchCombineShuffleConcat(*${root}, ${matchinfo}); }]),
1573
1570
(apply [{ Helper.applyCombineShuffleConcat(*${root}, ${matchinfo}); }])>;
0 commit comments