public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103544] compiler crashes when trying to vectorize loop Date: Fri, 03 Dec 2021 20:13:29 +0000 [thread overview] Message-ID: <bug-103544-4-bkW81tyfrm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103544-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103544 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Testcase: #include <array> #include <immintrin.h> int crash_me(char* ptr, size_t size){ std::array<short, 16> result = {0}; size_t no_iters = 0; for(size_t i = 0; i < size - 12; i+= 13){ for(size_t j = 0; j < 12; j++){ result[j] += ptr[i + j] - '0'; } no_iters++; } int result_int = 0; for(int j = 0; j < 12; j++){ int bit_value = result[j] > no_iters/2 ? 1 : 0; result_int |= bit_value; } return result_int; }
next prev parent reply other threads:[~2021-12-03 20:13 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-03 17:20 [Bug c++/103544] New: " monad at posteo dot net 2021-12-03 20:13 ` pinskia at gcc dot gnu.org [this message] 2021-12-03 20:16 ` [Bug tree-optimization/103544] [11/12 Regression] " pinskia at gcc dot gnu.org 2021-12-06 8:20 ` rguenth at gcc dot gnu.org 2021-12-06 9:52 ` rguenth at gcc dot gnu.org 2021-12-06 10:41 ` rguenth at gcc dot gnu.org 2021-12-06 11:53 ` cvs-commit at gcc dot gnu.org 2021-12-06 11:54 ` [Bug tree-optimization/103544] [11 " rguenth at gcc dot gnu.org 2022-01-04 9:16 ` cvs-commit at gcc dot gnu.org 2022-02-17 10:13 ` cvs-commit at gcc dot gnu.org 2022-02-17 10:13 ` cvs-commit at gcc dot gnu.org 2022-02-17 10:14 ` rguenth at gcc dot gnu.org
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-103544-4-bkW81tyfrm@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: linkBe 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).