public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114676] [12/13/14 Regression] DSE removes assignment that is used later Date: Wed, 17 Apr 2024 17:34:01 +0000 [thread overview] Message-ID: <bug-114676-4-i4YjFNKQog@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114676-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114676 --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Andreas Krebbel from comment #13) > We will go and fix PyTorch instead. Although it is not clearly documented, > the way PyTorch uses the builtin right now is probably not what was > intended. It is pretty clear that the element type pointer needs to alias > vectors of the same element type, but there is no saying about aliasing > everything. > > I'm just wondering how to improve the diagnostics in our backend to catch > this. The example below is similar to what PyTorch does today. Casting mem > to (float*) prevents our builtin code from complaining about the type > mismatch and by that opens the door for the much harder to debug TBAA > problem. We need a TBAA analyzer among sanitizers (but writing it is really hard). > #include <vecintrin.h> > > void __attribute__((noinline)) foo (int *mem) > { > vec_xst ((vector float){ 1.0f, 2.0f, 3.0f, 4.0f }, 0, (float*)mem); So use *(vector float __attribute__((__may_alias__)) *)mem = (vector float){ 1.0f, 2.0f, 3.0f, 4.0f }; instead? Sure, GCC extension, not an intrinsic in that case...
next prev parent reply other threads:[~2024-04-17 17:34 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-10 10:52 [Bug tree-optimization/114676] New: " aleksei.nikiforov at linux dot ibm.com 2024-04-10 11:06 ` [Bug target/114676] " pinskia at gcc dot gnu.org 2024-04-10 11:22 ` aleksei.nikiforov at linux dot ibm.com 2024-04-10 11:25 ` pinskia at gcc dot gnu.org 2024-04-10 11:28 ` aleksei.nikiforov at linux dot ibm.com 2024-04-10 11:33 ` pinskia at gcc dot gnu.org 2024-04-10 13:40 ` jakub at gcc dot gnu.org 2024-04-10 16:47 ` rguenth at gcc dot gnu.org 2024-04-11 12:30 ` krebbel at gcc dot gnu.org 2024-04-11 12:35 ` jakub at gcc dot gnu.org 2024-04-11 12:36 ` jakub at gcc dot gnu.org 2024-04-11 15:48 ` krebbel at gcc dot gnu.org 2024-04-12 13:32 ` law at gcc dot gnu.org 2024-04-12 18:36 ` sjames at gcc dot gnu.org 2024-04-17 17:01 ` krebbel at gcc dot gnu.org 2024-04-17 17:34 ` jakub at gcc dot gnu.org [this message] 2024-04-18 14:29 ` aleksei.nikiforov at linux dot ibm.com 2024-04-22 9:37 ` krebbel at gcc dot gnu.org 2024-04-23 8:17 ` cvs-commit 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-114676-4-i4YjFNKQog@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).