PR middle-end/84309
commita35ca4442e3200be6a8caa143924489d3f2a445d
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Feb 2018 08:34:42 +0000 (13 08:34 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Feb 2018 08:34:42 +0000 (13 08:34 +0000)
treed7abb7ffececb36706b28e05151701a372dc8cc5
parent5b498f30dd8bf72907c222d4f49a07824dcc994d
PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
* generic-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* gimple-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* omp-simd-clone.h: New file.
* omp-simd-clone.c: Include omp-simd-clone.h.
(expand_simd_clones): No longer static.
* tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
cgraph.h and omp-simd-clone.h.
(vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
(vect_recog_widen_shift_pattern): Formatting fix.
(vect_pattern_recog_1): Don't check optab for calls.

* gcc.dg/pr84309.c: New test.
* gcc.target/i386/pr84309.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257617 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/generic-match-head.c
gcc/gimple-match-head.c
gcc/match.pd
gcc/omp-simd-clone.c
gcc/omp-simd-clone.h [new file with mode: 0644]
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr84309.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr84309.c [new file with mode: 0644]
gcc/tree-vect-patterns.c