[llvm] [GISel] Handle more opcodes in constant_fold_binop (PR #102640)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 12:13:29 PDT 2024


================
@@ -1107,7 +1107,7 @@ def reassocs : GICombineGroup<[reassoc_ptradd, reassoc_comm_binops]>;
 // Constant fold operations.
 def constant_fold_binop : GICombineRule<
   (defs root:$d, apint_matchinfo:$matchinfo),
-  (match (wip_match_opcode G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR, G_SHL, G_LSHR, G_ASHR):$d,
+  (match (wip_match_opcode G_ADD, G_PTR_ADD, G_AND, G_ASHR, G_LSHR, G_MUL, G_OR, G_SHL, G_SUB, G_XOR, G_UDIV, G_SDIV, G_UREM, G_SREM, G_SMIN, G_SMAX, G_UMIN, G_UMAX):$d,
----------------
s-barannikov wrote:

Line is too long.

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


More information about the llvm-commits mailing list