[llvm] [AArch64][GloablISel] Refactor Combine G_CONCAT_VECTOR (PR #80866)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 09:49:09 PST 2024
================
@@ -224,22 +224,22 @@ class CombinerHelper {
/// - concat_vector(undef, undef) => undef
/// - concat_vector(build_vector(A, B), build_vector(C, D)) =>
/// build_vector(A, B, C, D)
- ///
- /// \pre MI.getOpcode() == G_CONCAT_VECTORS.
- bool tryCombineConcatVectors(MachineInstr &MI);
+ /// ==========================================================
/// Check if the G_CONCAT_VECTORS \p MI is undef or if it
/// can be flattened into a build_vector.
- /// In the first case \p IsUndef will be true.
- /// In the second case \p Ops will contain the operands needed
- /// to produce the flattened build_vector.
+ /// In the first case \p bool will be true.
+ /// In the second case \p SmallVector<Register> will contain the operands
+ /// needed to produce the flattened build_vector.
///
/// \pre MI.getOpcode() == G_CONCAT_VECTORS.
- bool matchCombineConcatVectors(MachineInstr &MI, bool &IsUndef,
- SmallVectorImpl<Register> &Ops);
- /// Replace \p MI with a flattened build_vector with \p Ops or an
- /// implicit_def if IsUndef is true.
- void applyCombineConcatVectors(MachineInstr &MI, bool IsUndef,
- const ArrayRef<Register> Ops);
+ bool
+ matchCombineConcatVectors(MachineInstr &MI,
+ std::pair<bool, SmallVector<Register>> &matchinfo);
+ /// Replace \p MI with a flattened build_vector with \p SmallVector<Register>
+ /// or an implicit_def if \p bool is true.
----------------
arsenm wrote:
Probably should refer to the pair fields as first/second rather than the type. Don't know what doxygen will do with \p on just the type
https://github.com/llvm/llvm-project/pull/80866
More information about the llvm-commits
mailing list