re PR tree-optimization/37242 (missed FRE opportunity because of signedness of addition)
authorRichard Biener <rguenther@suse.de>
Tue, 20 Aug 2019 12:02:56 +0000 (12:02 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 20 Aug 2019 12:02:56 +0000 (12:02 +0000)
commit3ed01d5408045d80a1efc42fadacfcfb98f14997
tree5a8134073d50509866bc11b02a3f768d98a2a994
parenta53aa4da8add4e3adc6c38f70eb172d570865831
re PR tree-optimization/37242 (missed FRE opportunity because of signedness of addition)

2019-08-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/37242
* tree-ssa-sccvn.c (visit_nary_op): Also CSE (T)(a + b)
to (T)a + (T)b if we know that a + b does not overflow.

* gcc.dg/tree-ssa/ssa-fre-80.c: New testcase.

From-SVN: r274746
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-80.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.c