diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-10-22 09:34:28 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-10-22 09:36:25 +0200 |
commit | ef2d3ec325b1b720df5da20784eba46249af2294 (patch) | |
tree | 10832291605a7ebfeb0bb730f5a8b5851bb72f11 /gcc/c-family/c-cppbuiltin.c | |
parent | 17c5b7e1dc47bab6e6cedbf4b2d88cef3283533e (diff) | |
download | gcc-ef2d3ec325b1b720df5da20784eba46249af2294.zip gcc-ef2d3ec325b1b720df5da20784eba46249af2294.tar.gz gcc-ef2d3ec325b1b720df5da20784eba46249af2294.tar.bz2 |
phiopt: Optimize x ? __builtin_clz (x) : 32 in GIMPLE fallout [PR97503]
> this broke sparc-sun-solaris2.11 bootstrap
>
> /vol/gcc/src/hg/master/local/gcc/tree-ssa-phiopt.c: In function 'bool cond_removal_in_popcount_clz_ctz_pattern(basic_block, basic_block, edge, edge, gimple*, tree, tree)':
> /vol/gcc/src/hg/master/local/gcc/tree-ssa-phiopt.c:1858:27: error: variable 'mode' set but not used [-Werror=unused-but-set-variable]
> 1858 | scalar_int_mode mode = SCALAR_INT_TYPE_MODE (TREE_TYPE (arg));
> | ^~~~
>
>
> and doubtlessly several other targets that use the defaults.h definition of
>
> #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
Ugh, seems many of those macros do not evaluate the first argument.
This got broken by the change to direct_internal_fn_supported_p, previously
it used mode also in the optab test.
2020-10-22 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-phiopt.c (cond_removal_in_popcount_clz_ctz_pattern):
For CLZ and CTZ tests, use type temporary instead of mode.
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.c')
0 files changed, 0 insertions, 0 deletions