niter: Fix up unused var warning [PR108457]
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Jan 2023 09:23:49 +0000 (10:23 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 20 Jan 2023 09:23:49 +0000 (10:23 +0100)
commit16bd9e14f226e07bf0ffb9d68084c9ad69bf7b45
tree320940c3bee352cd0fb9f56e5b7a8c8ee5ca7ef3
parent0846336de56119777861e02bf68f92a6af466000
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.
gcc/tree-ssa-loop-niter.cc