[PATCH] Fix redundant load missed by fre [tree-optimization 92980]

Hongtao Liu crazylht@gmail.com
Wed Dec 18 02:50:00 GMT 2019


Hi:
  This patch is to simplify A * C + (-D) -> (A - D/C) * C when C is a
power of 2 and D mod C == 0.
  bootstrap and make check is ok.

changelog
gcc/
        * gcc/match.pd (A * C + (-D) = (A - D/C) * C. when C is a
        power of 2 and D mod C == 0): Add new simplification.

gcc/testsuite
        * gcc.dg/pr92980.c: New test.

-- 
BR,
Hongtao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Simplify-A-C-D-A-D-C-C.-when-C-is-a-power-of-2.patch
Type: text/x-patch
Size: 2738 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191218/51b18b2a/attachment.bin>


More information about the Gcc-patches mailing list