public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: zhongjuzhe <juzhe.zhong@rivai.ai>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] middle-end: Fix unexpected warnings for RISC-V port.
Date: Tue, 23 Aug 2022 07:07:22 +0000 (UTC)	[thread overview]
Message-ID: <nycvar.YFH.7.77.849.2208230707140.13569@jbgna.fhfr.qr> (raw)
In-Reply-To: <20220823070631.154633-1-juzhe.zhong@rivai.ai>

On Tue, 23 Aug 2022, juzhe.zhong@rivai.ai wrote:

> From: zhongjuzhe <juzhe.zhong@rivai.ai>

OK.

> gcc/ChangeLog:
> 
>         * tree-vect-loop-manip.cc (vect_gen_vector_loop_niters): Simply initialize const_vf to 0.
> 
> ---
>  gcc/tree-vect-loop-manip.cc | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
> index 86d2264054a..c3a24e6c39a 100644
> --- a/gcc/tree-vect-loop-manip.cc
> +++ b/gcc/tree-vect-loop-manip.cc
> @@ -1977,8 +1977,9 @@ vect_gen_vector_loop_niters (loop_vec_info loop_vinfo, tree niters,
>      }
>    else
>      ni_minus_gap = niters;
> -
> -  unsigned HOST_WIDE_INT const_vf;
> +  
> +  /* To silence some unexpected warnings, simply initialize to 0. */
> +  unsigned HOST_WIDE_INT const_vf = 0;
>    if (vf.is_constant (&const_vf)
>        && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo))
>      {
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
HRB 36809 (AG Nuernberg)

      reply	other threads:[~2022-08-23  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  7:06 juzhe.zhong
2022-08-23  7:07 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.77.849.2208230707140.13569@jbgna.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).