aboutsummaryrefslogtreecommitdiff
path: root/gcc/errors.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-01-11 10:35:10 +0100
committerJakub Jelinek <jakub@redhat.com>2021-01-11 10:36:24 +0100
commit9a6c37e6ae520534993ef76dd45d016c8c86db21 (patch)
treed0035483cb49261a3fcdf2b3122adb700f585f7d /gcc/errors.c
parent9febe9e4be7812519258ea3ed4f38bbc1a61624b (diff)
downloadgcc-9a6c37e6ae520534993ef76dd45d016c8c86db21.zip
gcc-9a6c37e6ae520534993ef76dd45d016c8c86db21.tar.gz
gcc-9a6c37e6ae520534993ef76dd45d016c8c86db21.tar.bz2
reassoc: Reassociate integral multiplies [PR95867]
For floating point multiply, we have nice code in reassoc to reassociate multiplications to almost optimal sequence of as few multiplications as possible (or library call), but for integral types we just give up because there is no __builtin_powi* for those types. As there is no library routine we could use, instead of adding new internal call just to hold it temporarily and then lower to multiplications again, this patch for the integral types calls into the sincos pass routine that expands it into multiplications right away. 2021-01-11 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/95867 * tree-ssa-math-opts.h: New header. * tree-ssa-math-opts.c: Include tree-ssa-math-opts.h. (powi_as_mults): No longer static. Use build_one_cst instead of build_real. Formatting fix. * tree-ssa-reassoc.c: Include tree-ssa-math-opts.h. (attempt_builtin_powi): Handle multiplication reassociation without powi_fndecl using powi_as_mults. (reassociate_bb): For integral types don't require -funsafe-math-optimizations to call attempt_builtin_powi. * gcc.dg/tree-ssa/pr95867.c: New test.
Diffstat (limited to 'gcc/errors.c')
0 files changed, 0 insertions, 0 deletions