public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110531] New: Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc
@ 2023-07-03  9:16 hliu at amperecomputing dot com
  2023-07-03 10:19 ` [Bug tree-optimization/110531] " linkw at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hliu at amperecomputing dot com @ 2023-07-03  9:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531

            Bug ID: 110531
           Summary: Vect: slp_done_for_suggested_uf is not initialized in
                    tree-vect-loop.cc
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hliu at amperecomputing dot com
  Target Milestone: ---

This seems an obvious bug in tree-vect-loop.cc:

(1) This var is declared (but not initialized) and used in function
vect_analyze_loop_1:

  bool slp_done_for_suggested_uf;           <---- Warning, this is not
initialized

  /* Run the main analysis.  */
  opt_result res = vect_analyze_loop_2 (loop_vinfo, fatal,
                                        &suggested_unroll_factor,
                                        slp_done_for_suggested_uf);

(2) It is used before set in function vect_analyze_loop_2:
static opt_result
vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal,
                     unsigned *suggested_unroll_factor,
                     bool& slp_done_for_suggested_uf)
  ...
  bool slp = !applying_suggested_uf || slp_done_for_suggested_uf;  <--- used
without initialized
  ...
  slp_done_for_suggested_uf = slp;


I don't know the detail logic and wonder if it should be initialized as "true"
or "false" (probably it should be "false").

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-05  2:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03  9:16 [Bug tree-optimization/110531] New: Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc hliu at amperecomputing dot com
2023-07-03 10:19 ` [Bug tree-optimization/110531] " linkw at gcc dot gnu.org
2023-07-04  1:48 ` hliu at amperecomputing dot com
2023-07-04  2:25 ` linkw at gcc dot gnu.org
2023-07-04  5:28 ` hliu at amperecomputing dot com
2023-07-04  5:37 ` hliu at amperecomputing dot com
2023-07-04  6:52 ` linkw at gcc dot gnu.org
2023-07-04  8:11 ` hliu at amperecomputing dot com
2023-07-04  9:14 ` linkw at gcc dot gnu.org
2023-07-04  9:20 ` cvs-commit at gcc dot gnu.org
2023-07-04  9:33 ` hliu at amperecomputing dot com
2023-07-04  9:42 ` linkw at gcc dot gnu.org
2023-07-05  2:07 ` hliu at amperecomputing dot com

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).