public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37700]  New: [alias-improvements-branch] redundant load doesn't get eliminated
@ 2008-10-01 14:35 dorit at gcc dot gnu dot org
  2008-10-01 15:34 ` [Bug tree-optimization/37700] " rguenth at gcc dot gnu dot org
  2009-01-03  0:36 ` rguenth at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: dorit at gcc dot gnu dot org @ 2008-10-01 14:35 UTC (permalink / raw)
  To: gcc-bugs

This happens in testcase gcc.dg/vect/slp-19.c:

The problem is with the loop at line 17: with trunk we detect that one of
the elements of array 'in' is read twice, so we generate overall 8 loads
(reusing one of them). On the alias branch we do not eliminate the extra
load. All the reads and write are from/to local arrays, by the way. This
results in 9 loads, which the vectorizer interperts as a complicated SLP
permutation, so instead it is vectorized across iterations rather than
using SLP:
> "
> slp-19.c:17: note: Load permutation 0 1 2 4 5 6 7 8
> slp-19.c:17: note: Build SLP failed: unsupported load permutation out
> [D.2646_11] = D.2647_12;
> "


-- 
           Summary: [alias-improvements-branch] redundant load doesn't get
                    eliminated
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dorit at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37700


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/37700] [alias-improvements-branch] redundant load doesn't get eliminated
  2008-10-01 14:35 [Bug tree-optimization/37700] New: [alias-improvements-branch] redundant load doesn't get eliminated dorit at gcc dot gnu dot org
@ 2008-10-01 15:34 ` rguenth at gcc dot gnu dot org
  2009-01-03  0:36 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-01 15:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-10-01 15:33 -------
Smaller testcase, FRE should remove the redundancy but doesn't.

unsigned int out[16];
unsigned int in[16];
unsigned int ia[16];

int
foo (void)
{
  unsigned int i;

  for (i = 0; i < 16; ++i)
    {
      out[i] = in[i];
      ia[i] = in[i];
    }
}

this is because we include VOPs in the value-numbering but fail to
value-number them properly to account for non-aliased stores.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-10-01 15:33:28
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37700


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/37700] [alias-improvements-branch] redundant load doesn't get eliminated
  2008-10-01 14:35 [Bug tree-optimization/37700] New: [alias-improvements-branch] redundant load doesn't get eliminated dorit at gcc dot gnu dot org
  2008-10-01 15:34 ` [Bug tree-optimization/37700] " rguenth at gcc dot gnu dot org
@ 2009-01-03  0:36 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-03  0:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-01-03 00:33 -------
This is fixed on the branch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37700


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-03  0:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-01 14:35 [Bug tree-optimization/37700] New: [alias-improvements-branch] redundant load doesn't get eliminated dorit at gcc dot gnu dot org
2008-10-01 15:34 ` [Bug tree-optimization/37700] " rguenth at gcc dot gnu dot org
2009-01-03  0:36 ` rguenth at gcc dot gnu dot 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).