[llvm] [AArch64][GlobalISel] Improve MULL generation (PR #112405)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 04:01:03 PDT 2024


================
@@ -208,11 +208,19 @@ def mul_const : GICombineRule<
   (apply [{ applyAArch64MulConstCombine(*${root}, MRI, B, ${matchinfo}); }])
 >;
 
-def lower_mull : GICombineRule<
-  (defs root:$root),
+def mull_matchdata : GIDefMatchData<"std::tuple<bool, Register, Register>">;
+def extmultomull : GICombineRule<
+  (defs root:$root, mull_matchdata:$matchinfo),
+  (match (wip_match_opcode G_MUL):$root,
----------------
davemgreen wrote:

In this case we only want to check the opcode, as the operand info is passed between the match and the apply through a matchinfo. I'm not sure I understand why we want to have to specify the operands if they are never used, but I've switched it over.

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


More information about the llvm-commits mailing list