public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/99954] [8/9 Regression] Copy loop over array of unions at -O3 generates memcpy instead of memmove, resulting in incorrect code
Date: Wed, 28 Apr 2021 10:36:00 +0000	[thread overview]
Message-ID: <bug-99954-4-YIj3wenpR7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99954-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:b091cb1efa1881e93fb2e264daaab8876acf6800

commit r9-9471-gb091cb1efa1881e93fb2e264daaab8876acf6800
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Apr 7 13:17:05 2021 +0200

    tree-optimization/99954 - fix loop distribution memcpy classification

    This fixes bogus classification of a copy as memcpy.  We cannot use
    plain dependence analysis to decide between memcpy and memmove when
    it computes no dependence.  Instead we have to try harder later which
    the patch does for the gcc.dg/tree-ssa/ldist-24.c testcase by resorting
    to tree-affine to compute the difference between src and dest and
    compare against the copy size.

    2021-04-07  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/99954
            * tree-loop-distribution.c: Include tree-affine.h.
            (generate_memcpy_builtin): Try using tree-affine to prove
            non-overlap.
            (loop_distribution::classify_builtin_ldst): Always classify
            as PKIND_MEMMOVE.

            * gcc.dg/torture/pr99954.c: New testcase.

  parent reply	other threads:[~2021-04-28 10:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07  8:59 [Bug c/99954] New: " doublef.mobile at gmail dot com
2021-04-07  9:49 ` [Bug tree-optimization/99954] [8/9/10/11 Regression] " redi at gcc dot gnu.org
2021-04-07  9:50 ` redi at gcc dot gnu.org
2021-04-07 10:29 ` rguenth at gcc dot gnu.org
2021-04-07 11:13 ` rguenth at gcc dot gnu.org
2021-04-07 12:30 ` cvs-commit at gcc dot gnu.org
2021-04-07 12:30 ` [Bug tree-optimization/99954] [8/9/10 " rguenth at gcc dot gnu.org
2021-04-26 11:46 ` cvs-commit at gcc dot gnu.org
2021-04-28 10:36 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-29  9:51 ` [Bug tree-optimization/99954] [8 " cvs-commit at gcc dot gnu.org
2021-04-29  9:51 ` rguenth at gcc dot gnu.org
2024-05-14 17:01 ` 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-99954-4-YIj3wenpR7@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: link
Be 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).