From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 368863858C74 for ; Sun, 21 Aug 2022 00:18:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 368863858C74 Received: by mail-pl1-x632.google.com with SMTP id u22so7012026plq.12 for ; Sat, 20 Aug 2022 17:18:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=D+RQuD1FRH6fHlkdieJmEb3jysg1PH24bo3TXnWF1CQ=; b=njL8ttCkcYAWrsJd4EgpDoOvIzXqp4Hi7Ax7zVHl7zdP2JxXNnqxAfQ2DQ+iJTfDF4 +wRS6ZYPxm4SvNhQiCnvJYyYy0cJ+JfHFjNL81gxYCBpiiJi2Qk9c1spvRjWGGuprfh2 KLmYSiukxEXjC9elCoYd0ibnNIYFinjUUj1uN/POJyzMWS7CNgXJLc3akt03eliQlUMg t8lQqwKmdeQt5gdq49/gdIY6kOcUgBmsyLkNT2y1QSauq+w80fEqE3dY9lz8/SJEgO5q aU6buubrR6cAhrMSksabQGQ/JqLMdDFomTnqUvcszuubhMUt1evYpSTMfHgnGYKK/w3l auLg== X-Gm-Message-State: ACgBeo3CN4Lfg4nmxHV5gNVDf14GsbSyP0K5ZYnJXUQpbgK2ZWkWC6RF fsA0T0J2nwFfzfKjzv9UDLzLm+2RJtxNfHSQbp4= X-Google-Smtp-Source: AA6agR7zrT8gaMmTqq6NiwQPKBiBOKvC7skaPr27qxkqDIOCoX/BoooyETOYZDMK85Q2lrdHAqd6FvoYA9sgwBaTePs= X-Received: by 2002:a17:902:b410:b0:172:c9d1:7501 with SMTP id x16-20020a170902b41000b00172c9d17501mr7137685plr.106.1661041135188; Sat, 20 Aug 2022 17:18:55 -0700 (PDT) MIME-Version: 1.0 References: <20220817071950.271762-1-juzhe.zhong@rivai.ai> <87h726h7et.fsf@linux-m68k.org> <4492011496002C16+202208210805415609851@rivai.ai> In-Reply-To: <4492011496002C16+202208210805415609851@rivai.ai> From: Andrew Pinski Date: Sat, 20 Aug 2022 17:18:41 -0700 Message-ID: Subject: Re: Re: [PATCH] RISC-V: Add runtime invariant support To: =?UTF-8?B?6ZKf5bGF5ZOy?= Cc: Andreas Schwab , gcc-patches , "kito.cheng" , andrew , rguenther Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2022 00:20:34 -0000 On Sat, Aug 20, 2022 at 5:06 PM =E9=92=9F=E5=B1=85=E5=93=B2 wrote: > > Hi, it seems that this warning still report if I revert my patch. Am I ri= ght? Feel free to correct me. Maybe I need to try it again? The warning will not be still there. The reason is NUM_POLY_INT_COEFFS defaults to 1 which means vf.is_constant (&const_vf) will always return true and will always set const_vf. I don't know why the warning does not happen on aarch64-linux-gnu (the other target where NUM_POLY_INT_COEFFS is set to 2) though; it just might be slightly different IR which causes the warning mechanism not to warn. Thanks, Andrew Pinski > > ________________________________ > juzhe.zhong@rivai.ai > > > From: Andrew Pinski > Date: 2022-08-21 07:53 > To: Andreas Schwab > CC: juzhe.zhong; gcc-patches; kito.cheng; andrew; Richard Guenther > Subject: Re: [PATCH] RISC-V: Add runtime invariant support > On Sat, Aug 20, 2022 at 3:34 PM Andreas Schwab wr= ote: > > > > This breaks bootstrap: > > > > ../../gcc/tree-vect-loop-manip.cc: In function 'void vect_gen_vector_lo= op_niters(loop_vec_info, tree, tree_node**, tree_node**, bool)': > > ../../gcc/tree-vect-loop-manip.cc:1981:26: error: 'const_vf' may be use= d uninitialized [-Werror=3Dmaybe-uninitialized] > > 1981 | unsigned HOST_WIDE_INT const_vf; > > | ^~~~~~~~ > > cc1plus: all warnings being treated as errors > > make[3]: *** [Makefile:1146: tree-vect-loop-manip.o] Error 1 > > make[2]: *** [Makefile:4977: all-stage2-gcc] Error 2 > > make[1]: *** [Makefile:30363: stage2-bubble] Error 2 > > make: *** [Makefile:1065: all] Error 2 > > > This looks like a real uninitialized variable issue. > I even can't tell if the paths that lead to using const_vf will be > always set so how we expect GCC to do the same. > The code that uses const_vf was added with r11-5820-cdcbef3c3310, > CCing the author there. > > Thanks, > Andrew > > > > > -- > > Andreas Schwab, schwab@linux-m68k.org > > GPG Key fingerprint =3D 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA A= EC1 > > "And now for something completely different." >