[llvm] [GlobalISel] Combine (X >> C) << C to X & ((-1 >> C) << C) (PR #114821)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:53:26 PST 2024
================
@@ -365,6 +365,13 @@ def bitreverse_lshr : GICombineRule<
MRI.getType(${amt}.getReg())}}); }]),
(apply (G_SHL $d, $val, $amt))>;
+def lsb_bits_clearing_by_shifts_to_and: GICombineRule<
+ (defs root:$root, build_fn_matchinfo:$matchinfo),
+ (match (G_LSHR $d, $src, $amt1),
+ (G_SHL $root, $d, $amt2):$root,
----------------
arsenm wrote:
There are 2 constants here, you need to use different names for them
https://github.com/llvm/llvm-project/pull/114821
More information about the llvm-commits
mailing list