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

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 23:53:26 PDT 2024


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

Could you take a look at push_sub_through_zext, which is at the top of this file?

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


More information about the llvm-commits mailing list