public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hliu at amperecomputing dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc
Date: Tue, 04 Jul 2023 09:33:08 +0000	[thread overview]
Message-ID: <bug-110531-4-DJ4U5gxBI0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110531-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Hao Liu <hliu at amperecomputing dot com> ---
> foo is just an example for not getting inlined, the point here is extra cost paid.

My point is that the case is different from the original case in
tree-vect-loop.cc.  For example, change the case as following:

__attribute__((noipa)) int foo(int *a) { *a == 1 ? return 1 : return 0;}

That's similar to the original problem (the value of "a" is undefiend).

I don't mean that "a" must be initialized in test().  We can also initalize "a"
in foo, but should not use "a" before initialization. E.g.

__attribute__((noipa)) int foo(int *a) { 
  *a == 1;
  ...
  if (*a)
}

The above case has no problem.

  parent reply	other threads:[~2023-07-04  9:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  9:16 [Bug tree-optimization/110531] New: " 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 [this message]
2023-07-04  9:42 ` linkw at gcc dot gnu.org
2023-07-05  2:07 ` hliu at amperecomputing dot com

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=bug-110531-4-DJ4U5gxBI0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).