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: Thu, 11 Apr 2024 12:35:54 +0000 [thread overview] Message-ID: <bug-114676-4-BNHyD4W2Dl@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 #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It depends on what the vec_xl*/vec_xst* documentation requires/user expect. If the expectation is that the loads/stores should alias the scalar pointee of the pointer type passed to those intrinsics, then --- gcc/config/s390/s390-c.cc.jj 2024-01-03 11:51:54.847407588 +0100 +++ gcc/config/s390/s390-c.cc 2024-04-10 16:30:31.896197832 +0200 @@ -498,8 +498,8 @@ s390_expand_overloaded_builtin (location /* Build a vector type with the alignment of the source location in order to enable correct alignment hints to be generated for vl. */ - tree mem_type = build_aligned_type (return_type, - TYPE_ALIGN (TREE_TYPE (TREE_TYPE ((*arglist)[1])))); + unsigned align = TYPE_ALIGN (TREE_TYPE (TREE_TYPE ((*arglist)[1]))); + tree mem_type = build_aligned_type (return_type, align); return build2 (MEM_REF, mem_type, fold_build_pointer_plus ((*arglist)[1], (*arglist)[0]), build_int_cst (TREE_TYPE ((*arglist)[1]), 0)); @@ -511,11 +511,13 @@ s390_expand_overloaded_builtin (location /* Build a vector type with the alignment of the target location in order to enable correct alignment hints to be generated for vst. */ - tree mem_type = build_aligned_type (TREE_TYPE((*arglist)[0]), - TYPE_ALIGN (TREE_TYPE (TREE_TYPE ((*arglist)[2])))); + unsigned align = TYPE_ALIGN (TREE_TYPE (TREE_TYPE ((*arglist)[2]))); + tree mem_type = build_aligned_type (TREE_TYPE ((*arglist)[0]), align); return build2 (MODIFY_EXPR, mem_type, - build1 (INDIRECT_REF, mem_type, - fold_build_pointer_plus ((*arglist)[2], (*arglist)[1])), + build2 (MEM_REF, mem_type, + fold_build_pointer_plus ((*arglist)[2], + (*arglist)[1]), + build_int_cst (TREE_TYPE ((*arglist)[2]), 0)), (*arglist)[0]); } case S390_OVERLOADED_BUILTIN_s390_vec_load_pair: might be all that is needed (if it is needed at all). If the expectation is that one can read what has been written by those intrinsics or write what will be read by those intrinsics though unrelated effective pointers, then it should alias everything, which could be say just using ptr_type_node instead of the current types in both of the build_int_cst (..., 0) calls above.
next prev parent reply other threads:[~2024-04-11 12:35 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 [this message] 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 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-BNHyD4W2Dl@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).