diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-04-05 07:31:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-04-05 07:31:12 +0000 |
commit | 8d6b13da61aabc7c55d858ee3fd7ae22798d6a61 (patch) | |
tree | 86736c1fa49087e473dfafc0789158746bd70baa /gcc/config/msp430/msp430.c | |
parent | ce36ba09fe2c1b8523265e217f8cb478f50607c3 (diff) | |
download | gcc-8d6b13da61aabc7c55d858ee3fd7ae22798d6a61.zip gcc-8d6b13da61aabc7c55d858ee3fd7ae22798d6a61.tar.gz gcc-8d6b13da61aabc7c55d858ee3fd7ae22798d6a61.tar.bz2 |
Make FMA code cope with redundant negates (PR89956)
This patch fixes a case in which, due to forced missed optimisations
in earlier passes, we have:
_1 = a * b
_2 = -_1
_3 = -_1
_4 = _2 + _3
and treated _4 as two FNMA candidates, once via _2 and once via _3.
2019-04-05 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/89956
* tree-ssa-math-opts.c (convert_mult_to_fma): Protect against
multiple negates of the same value.
gcc/testsuite/
PR tree-optimization/89956
* gfortran.dg/pr89956.f90: New test.
From-SVN: r270162
Diffstat (limited to 'gcc/config/msp430/msp430.c')
0 files changed, 0 insertions, 0 deletions