[llvm] [GISel] funnel shift combiner port from SelectionDAG ISel to GlobalISel (PR #135132)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 00:59:12 PDT 2025


================
@@ -1033,6 +1033,24 @@ def funnel_shift_overshift: GICombineRule<
   (apply [{ Helper.applyFunnelShiftConstantModulo(*${root}); }])
 >;
 
+// Transform: fshl x, ?, y | shl x, y -> fshl x, ?, y
+def funnel_shift_or_shift_to_funnel_shift_left: GICombineRule<
+  (defs root:$root), 
+  (match (G_FSHL $out1, $x, $_, $y),
----------------
davemgreen wrote:

$_ -> $z if it gets used. $_ makes it look like an unused input, but IIUC it is just a different input variable?

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


More information about the llvm-commits mailing list