[llvm] [GlobalISel] Add and use a m_GAddLike pattern matcher. NFC (PR #125435)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 18:11:14 PST 2025
================
@@ -337,6 +343,21 @@ template <> struct bind_helper<MachineInstr *> {
}
};
+template <> struct bind_helper<const MachineInstr *> {
+ static bool bind(const MachineRegisterInfo &MRI, const MachineInstr *&MI,
+ Register Reg) {
+ MI = MRI.getVRegDef(Reg);
+ if (MI)
+ return true;
+ return false;
----------------
arsenm wrote:
Fold to return of bool expression
https://github.com/llvm/llvm-project/pull/125435
More information about the llvm-commits
mailing list