re PR middle-end/82004 (SPEC CPU2017 628.pop2_s miscompare)
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Mar 2018 19:15:39 +0000 (21:15 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 28 Mar 2018 19:15:39 +0000 (21:15 +0200)
commit30a2c10eb639f1855fe7e060552f09c706efa532
tree707858c0b19b0db09b4434b773deb95486f2dae0
parentcefc09063eb4b0eb572c89c3f0657e5b5e36e77d
re PR middle-end/82004 (SPEC CPU2017 628.pop2_s miscompare)

PR tree-optimization/82004
* gimple-match-head.c (optimize_pow_to_exp): New function.
* match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
Don't fold to exp if optimize_pow_to_exp is false.

* gcc.dg/pr82004.c: New test.

From-SVN: r258930
gcc/ChangeLog
gcc/gimple-match-head.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr82004.c [new file with mode: 0644]