[PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

Navid Rahimi navidrahimi@microsoft.com
Tue Nov 9 04:11:57 GMT 2021


Hi GCC community,

This patch will add the missed pattern described in bug 102232 [1] to the match.pd. The testcase will test whether the multiplication and division has been removed from the code or not. The correctness proof for this pattern is here [2] in case anyone is curious.

PR tree-optimization/102232
      * match.pd (x * (1 + y / x) - y) -> (x - y % x): New optimization.
      * gcc.dg/tree-ssa/pr102232.c: testcase for this optimization.


1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102232
2) https://alive2.llvm.org/ce/z/2VScjD

Best wishes,
Navid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR-tree-optimization-102232.patch
Type: application/octet-stream
Size: 2454 bytes
Desc: 0001-PR-tree-optimization-102232.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211109/64475591/attachment.obj>


More information about the Gcc-patches mailing list