[PATCH] D90674: [GlobalISel] Expand combine for (x & mask) -> x when (x & mask) == x

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 09:02:53 PST 2020


paquette added inline comments.


================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:385
 // Fold (x & mask) -> x when (x & mask) is known to equal x.
-def and_trivial_mask_matchinfo : GIDefMatchData<"Register">;
-def and_trivial_mask: GICombineRule <
-  (defs root:$root, and_trivial_mask_matchinfo:$matchinfo),
+def and_redundant_mask_matchinfo : GIDefMatchData<"Register">;
+def and_redundant_mask: GICombineRule <
----------------
foad wrote:
> I think we should define a standard Register matchdata that we can use here and elsewhere. Doesn't have to be part of this patch though.
+1


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90674/new/

https://reviews.llvm.org/D90674



More information about the llvm-commits mailing list