public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mkretz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111302] New: aligned std::experimental::simd loads and stores are not constant expressions Date: Wed, 06 Sep 2023 06:33:37 +0000 [thread overview] Message-ID: <bug-111302-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111302 Bug ID: 111302 Summary: aligned std::experimental::simd loads and stores are not constant expressions Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: mkretz at gcc dot gnu.org Reporter: mkretz at gcc dot gnu.org Target Milestone: --- Test case (https://godbolt.org/z/d16rvjjsK): #include <experimental/simd> namespace stdx = std::experimental; using V = stdx::native_simd<float>; alignas(64) constexpr float mem[32] = {}; constexpr V zero1 = V(mem, stdx::element_aligned); constexpr V zero2 = V(mem, stdx::vector_aligned); constexpr V zero3 = V(mem, stdx::overaligned<64>); constexpr float tmp1 = [](){ float buf[V::size()] = {}; V().copy_to(buf, stdx::element_aligned); return buf[0]; }(); constexpr float tmp2 = [](){ alignas(stdx::memory_alignment_v<V>) float buf[V::size()] = {}; V().copy_to(buf, stdx::vector_aligned); return buf[0]; }(); constexpr float tmp3 = [](){ alignas(64) float buf[V::size()] = {}; V().copy_to(buf, stdx::overaligned<64>); return buf[0]; }(); The element_aligned variants compile. The others don't, but they should.
next reply other threads:[~2023-09-06 6:33 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-06 6:33 mkretz at gcc dot gnu.org [this message] 2023-09-06 6:34 ` [Bug libstdc++/111302] " mkretz at gcc dot gnu.org 2024-05-07 7:41 ` 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-111302-4@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).