[PATCH] D110937: [AMDGPU][GlobalISel] Select v_fma_mix_f32 and v_mad_mix_f32
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 09:09:25 PDT 2021
paquette added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h:595-609
+// Helper for ignoring a copy when matching
+template <typename SubPatternT> struct IgnoreCopy_match {
+ SubPatternT SubPat;
+ IgnoreCopy_match(const SubPatternT &SP) : SubPat(SP) {}
+
+ bool match(const MachineRegisterInfo &MRI, Register Reg) {
+ mi_match(Reg, MRI, m_Copy(m_Reg(Reg)));
----------------
mbrkusanin wrote:
> @aemerson, @paquette Any objections to m_IgnoreCopy matcher?
I feel like it would be better to match multiple copies, kind of like `getDefIgnoringCopies`. You'll probably run into multiple copies one day, and chances are you'll want to walk past them too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110937/new/
https://reviews.llvm.org/D110937
More information about the llvm-commits
mailing list