[Bug tree-optimization/108457] [13 Regression] tree-ssa-loop-niter.cc:2255:23: warning: variable 'mode' set but not used
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 20 09:24:29 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108457
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:16bd9e14f226e07bf0ffb9d68084c9ad69bf7b45
commit r13-5268-g16bd9e14f226e07bf0ffb9d68084c9ad69bf7b45
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Jan 20 10:23:49 2023 +0100
niter: Fix up unused var warning [PR108457]
tree-ssa-loop-niter.cc (build_cltz_expr) gets unused variable mode
warning on some architectures where C[LT]Z_DEFINED_VALUE_AT_ZERO
macro(s) don't use the first argument (which includes the
defaults.h definitions of:
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
Other uses of this macro avoid this problem by avoiding temporaries
which are only used as argument to those macros, the following patch
does it the same way for consistency. Plus some formatting fixes
while at it.
2023-01-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/108457
* tree-ssa-loop-niter.cc (build_cltz_expr): Use
SCALAR_INT_TYPE_MODE (utype) directly as
C[LT]Z_DEFINED_VALUE_AT_ZERO
argument instead of a temporary. Formatting fixes.
More information about the Gcc-bugs
mailing list