@@ -211,6 +211,7 @@ def constantfp_matchinfo : GIDefMatchData<"ConstantFP*">;
211211def build_fn_matchinfo :
212212GIDefMatchData<"std::function<void(MachineIRBuilder &)>">;
213213def unsigned_matchinfo: GIDefMatchData<"unsigned">;
214+ def register_vector_matchinfo : GIDefMatchData<"SmallVector<Register>">;
214215
215216def copy_prop : GICombineRule<
216217 (defs root:$d),
@@ -811,9 +812,8 @@ def zext_trunc_fold: GICombineRule <
811812 (apply [{ Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }])
812813>;
813814
814- def not_cmp_fold_matchinfo : GIDefMatchData<"SmallVector<Register, 4>">;
815815def not_cmp_fold : GICombineRule<
816- (defs root:$d, not_cmp_fold_matchinfo :$info),
816+ (defs root:$d, register_vector_matchinfo :$info),
817817 (match (wip_match_opcode G_XOR): $d,
818818 [{ return Helper.matchNotCmp(*${d}, ${info}); }]),
819819 (apply [{ Helper.applyNotCmp(*${d}, ${info}); }])
@@ -828,9 +828,8 @@ def fneg_fneg_fold: GICombineRule <
828828>;
829829
830830// Fold (unmerge(merge x, y, z)) -> z, y, z.
831- def unmerge_merge_matchinfo : GIDefMatchData<"SmallVector<Register, 8>">;
832831def unmerge_merge : GICombineRule<
833- (defs root:$d, unmerge_merge_matchinfo :$info),
832+ (defs root:$d, register_vector_matchinfo :$info),
834833 (match (wip_match_opcode G_UNMERGE_VALUES): $d,
835834 [{ return Helper.matchCombineUnmergeMergeToPlainValues(*${d}, ${info}); }]),
836835 (apply [{ Helper.applyCombineUnmergeMergeToPlainValues(*${d}, ${info}); }])
@@ -955,9 +954,8 @@ def ptr_add_with_zero: GICombineRule<
955954 [{ return Helper.matchPtrAddZero(*${root}); }]),
956955 (apply [{ Helper.applyPtrAddZero(*${root}); }])>;
957956
958- def regs_small_vec : GIDefMatchData<"SmallVector<Register, 4>">;
959957def combine_insert_vec_elts_build_vector : GICombineRule<
960- (defs root:$root, regs_small_vec :$info),
958+ (defs root:$root, register_vector_matchinfo :$info),
961959 (match (wip_match_opcode G_INSERT_VECTOR_ELT):$root,
962960 [{ return Helper.matchCombineInsertVecElts(*${root}, ${info}); }]),
963961 (apply [{ Helper.applyCombineInsertVecElts(*${root}, ${info}); }])>;
@@ -1553,9 +1551,8 @@ def nneg_zext : GICombineRule<
15531551 (apply [{ Helper.applyBuildFnMO(${root}, ${matchinfo}); }])>;
15541552
15551553// Combines concat operations
1556- def concat_matchinfo : GIDefMatchData<"SmallVector<Register>">;
15571554def combine_concat_vector : GICombineRule<
1558- (defs root:$root, concat_matchinfo :$matchinfo),
1555+ (defs root:$root, register_vector_matchinfo :$matchinfo),
15591556 (match (wip_match_opcode G_CONCAT_VECTORS):$root,
15601557 [{ return Helper.matchCombineConcatVectors(*${root}, ${matchinfo}); }]),
15611558 (apply [{ Helper.applyCombineConcatVectors(*${root}, ${matchinfo}); }])>;
@@ -1567,7 +1564,7 @@ def combine_concat_vector : GICombineRule<
15671564// ===>
15681565// c = G_CONCAT_VECTORS x, y, z, undef
15691566def combine_shuffle_concat : GICombineRule<
1570- (defs root:$root, concat_matchinfo :$matchinfo),
1567+ (defs root:$root, register_vector_matchinfo :$matchinfo),
15711568 (match (wip_match_opcode G_SHUFFLE_VECTOR):$root,
15721569 [{ return Helper.matchCombineShuffleConcat(*${root}, ${matchinfo}); }]),
15731570 (apply [{ Helper.applyCombineShuffleConcat(*${root}, ${matchinfo}); }])>;
0 commit comments