[llvm] [GlobalISel] Allow expansion of urem by constant in prelegalizer (PR #145914)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 22:49:36 PDT 2025
================
@@ -1156,6 +1156,14 @@ def udiv_by_pow2 : GICombineRule<
def intdiv_combines : GICombineGroup<[udiv_by_const, sdiv_by_const,
sdiv_by_pow2, udiv_by_pow2]>;
+def urem_by_const : GICombineRule<
+ (defs root:$root),
+ (match (wip_match_opcode G_UREM):$root,
----------------
arsenm wrote:
We want to move away from using wip_match_opcode, can you use the new syntax that lists opcodes?
https://github.com/llvm/llvm-project/pull/145914
More information about the llvm-commits
mailing list