CSE negated multiplications and divisions
authorRichard Biener <rguenther@suse.de>
Thu, 17 Sep 2020 09:48:36 +0000 (11:48 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 17 Sep 2020 11:56:15 +0000 (13:56 +0200)
commitc7f4be78cb61006492d16375aba5392f580cd633
treefae2071cad4368dfc130f1d0a4512567cd9369b4
parent225a08220e444371ae4867b3e2ace275d30af3d3
CSE negated multiplications and divisions

This adds the capability to look for available negated multiplications
and divisions, replacing them with cheaper negates.

2020-09-17  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.c (visit_nary_op): Value-number multiplications
and divisions to negates of available negated forms.

* gcc.dg/tree-ssa/ssa-fre-88.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-88.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.c