public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete @ 2021-07-02 9:56 rguenth at gcc dot gnu.org 2021-07-02 9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2021-07-02 9:56 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101293 Bug ID: 101293 Summary: LIM ref canonicalization incomplete Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- We fail to apply store-motion to struct X { int i; int j; }; void foo(struct X *x, int n) { for (int i = 0; i < n; ++i) { int *p = &x->j; int tem = *p; x->j += tem * i; } } because we end up with two distinct memory references: Memory reference 1: MEM[(int *)x_7(D) + 4B] Memory reference 2: x_7(D)->j ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101293] LIM ref canonicalization incomplete 2021-07-02 9:56 [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete rguenth at gcc dot gnu.org @ 2021-07-02 9:57 ` rguenth at gcc dot gnu.org 2021-07-02 11:54 ` cvs-commit at gcc dot gnu.org 2021-07-02 11:55 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2021-07-02 9:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101293 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Last reconfirmed| |2021-07-02 Ever confirmed|0 |1 Keywords| |missed-optimization Status|UNCONFIRMED |ASSIGNED Blocks| |99728 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Mine. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99728 [Bug 99728] code pessimization when using wrapper classes around SIMD types ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101293] LIM ref canonicalization incomplete 2021-07-02 9:56 [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete rguenth at gcc dot gnu.org 2021-07-02 9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org @ 2021-07-02 11:54 ` cvs-commit at gcc dot gnu.org 2021-07-02 11:55 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-07-02 11:54 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101293 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:4546f423ecff96f223adfbec4963d2ff17f27c7b commit r12-1977-g4546f423ecff96f223adfbec4963d2ff17f27c7b Author: Richard Biener <rguenther@suse.de> Date: Fri Jul 2 12:57:06 2021 +0200 tree-optimization/101293 - further enhance LIMs ref canonicalization This makes sure to handle MEM[p + 4] and MEM[p].j with j at offset 4 as the same ref in store motion. For hashing we need to be more restrictive in what we handle since there's no poly-int handlers for inchash. For comparison we can compare poly_offsets directly. 2021-07-02 Richard Biener <rguenther@suse.de> PR tree-optimization/101293 * tree-ssa-loop-im.c (mem_ref_hasher::equal): Compare MEM_REF bases with combined offsets. (gather_mem_refs_stmt): Hash MEM_REFs as if their offset were combined with the rest of the offset. * gcc.dg/tree-ssa/ssa-lim-15.c: New testcase. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/101293] LIM ref canonicalization incomplete 2021-07-02 9:56 [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete rguenth at gcc dot gnu.org 2021-07-02 9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org 2021-07-02 11:54 ` cvs-commit at gcc dot gnu.org @ 2021-07-02 11:55 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2021-07-02 11:55 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101293 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-02 11:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-02 9:56 [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete rguenth at gcc dot gnu.org 2021-07-02 9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org 2021-07-02 11:54 ` cvs-commit at gcc dot gnu.org 2021-07-02 11:55 ` rguenth at gcc dot gnu.org
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).