[llvm] [TableGen] HasOneUse builtin predicate on PatFrags (PR #91578)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 03:09:45 PDT 2024


================
@@ -32,10 +34,15 @@ def : GINodeEquiv<G_TGT_MUL24, TGTmul24_impl>;
 def TGTmul24_oneuse : PatFrag<
   (ops node:$src0, node:$src1),
   (TGTmul24 $src0, $src1),
+#ifndef HASONEUSE
   [{ return N->hasOneUse(); }]> {
   let GISelPredicateCode = [{
     return MRI->hasOneNonDBGUse(MI.getOperand(0).getReg());
----------------
arsenm wrote:

Maybe should change the sample predicate code 

https://github.com/llvm/llvm-project/pull/91578


More information about the llvm-commits mailing list