public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101639] New: vectorization with bool reduction
@ 2021-07-27 10:58 glisse at gcc dot gnu.org
  2021-07-27 11:21 ` [Bug tree-optimization/101639] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2021-07-27 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101639
           Summary: vectorization with bool reduction
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-*-*

bool f(char* p, long n)
{
  bool r = true;
  for(long i = 0; i < n; ++i)
    r &= (p[i] != 0);
  return r;
}

is not vectorized, while if I simply declare r as char instead of bool, it is
(not quite optimal since it fails to pull &1 out of the loop, but that's a
separate issue).

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

end of thread, other threads:[~2024-06-18  6:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 10:58 [Bug tree-optimization/101639] New: vectorization with bool reduction glisse at gcc dot gnu.org
2021-07-27 11:21 ` [Bug tree-optimization/101639] " rguenth at gcc dot gnu.org
2024-06-18  6:25 ` rguenth at gcc dot gnu.org
2024-06-18  6:25 ` rguenth at gcc dot gnu.org

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