public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36228]  New: redundant runtime check while vectorizing
@ 2008-05-13 13:00 razya at il dot ibm dot com
  2008-05-13 13:41 ` [Bug tree-optimization/36228] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: razya at il dot ibm dot com @ 2008-05-13 13:00 UTC (permalink / raw)
  To: gcc-bugs

/* { dg-do compile } */
/* { dg-options "-O3 -c" } */

#define COLS         8
#define ROWS         8

int
t_run_test(void);

int
t_run_test()
{
     int k_1,i_1, j_1;
     static signed char f_1[ROWS][COLS] ;
     static long F_1[ROWS][COLS] ;
     long cosMatrixA[ROWS][COLS] ;

     for( k_1 = 0 ; k_1 < COLS ; k_1++ )
        {
            for( i_1 = 0 ; i_1 < ROWS ; i_1++ )
            {
                for( j_1 = 0 ; j_1 < COLS ; j_1++ )
                    F_1[i_1][j_1] += f_1[i_1][k_1] * cosMatrixA[k_1][j_1] ;
            }
        }

  return 0;
}

A redundant check for aliasing is created.
Looking at the vectorizer's dump, we see:
versioning for alias required: can't determine dependence between
F_1[i_1_41][j_1_42] and F_1[i_1_41][j_1_42]

Tested on Power6.


-- 
           Summary: redundant runtime check while vectorizing
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: razya at il dot ibm dot com


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


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

* [Bug tree-optimization/36228] redundant runtime check while vectorizing
  2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
@ 2008-05-13 13:41 ` rguenth at gcc dot gnu dot org
  2008-05-14  3:59 ` spop at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-13 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-05-13 13:40 -------
I belive this is a known issue with the data-dependence analyzer?  (I never
understood why it doesn't recognize identical references...)


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu dot org
           Severity|normal                      |enhancement
           Keywords|                            |missed-optimization


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


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

* [Bug tree-optimization/36228] redundant runtime check while vectorizing
  2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
  2008-05-13 13:41 ` [Bug tree-optimization/36228] " rguenth at gcc dot gnu dot org
@ 2008-05-14  3:59 ` spop at gcc dot gnu dot org
  2008-05-15 21:56 ` sebpop at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-05-14  3:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from spop at gcc dot gnu dot org  2008-05-14 03:59 -------
Subject: Re:  redundant runtime check while vectorizing

How costly would it be if we do as a first data dependence test a call
to operand_equal_p on the array references?  That certainly would
avoid lot of computations downstream in the data dependence test, but
would be applied as an initial test to all dependence relations.


-- 


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


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

* [Bug tree-optimization/36228] redundant runtime check while vectorizing
  2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
  2008-05-13 13:41 ` [Bug tree-optimization/36228] " rguenth at gcc dot gnu dot org
  2008-05-14  3:59 ` spop at gcc dot gnu dot org
@ 2008-05-15 21:56 ` sebpop at gmail dot com
  2008-05-15 22:01 ` rguenth at gcc dot gnu dot org
  2008-05-16 16:47 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: sebpop at gmail dot com @ 2008-05-15 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sebpop at gmail dot com  2008-05-15 21:55 -------
Subject: Re:  redundant runtime check while vectorizing

Here is a patch for this:
> a first data dependence test a call to operand_equal_p on the array references
Tested with vect.exp and tree-ssa.exp.
I will send another email to gcc-patches with the patch once it passes
the tests on gccfarm.

Sebastian


------- Comment #4 from sebpop at gmail dot com  2008-05-15 21:55 -------
Created an attachment (id=15643)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15643&action=view)


-- 


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


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

* [Bug tree-optimization/36228] redundant runtime check while vectorizing
  2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
                   ` (2 preceding siblings ...)
  2008-05-15 21:56 ` sebpop at gmail dot com
@ 2008-05-15 22:01 ` rguenth at gcc dot gnu dot org
  2008-05-16 16:47 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-15 22:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-05-15 22:01 -------
operand_equal_p is reasonably cheap.


-- 


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


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

* [Bug tree-optimization/36228] redundant runtime check while vectorizing
  2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
                   ` (3 preceding siblings ...)
  2008-05-15 22:01 ` rguenth at gcc dot gnu dot org
@ 2008-05-16 16:47 ` spop at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: spop at gcc dot gnu dot org @ 2008-05-16 16:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from spop at gcc dot gnu dot org  2008-05-16 16:46 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-05-16 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-13 13:00 [Bug tree-optimization/36228] New: redundant runtime check while vectorizing razya at il dot ibm dot com
2008-05-13 13:41 ` [Bug tree-optimization/36228] " rguenth at gcc dot gnu dot org
2008-05-14  3:59 ` spop at gcc dot gnu dot org
2008-05-15 21:56 ` sebpop at gmail dot com
2008-05-15 22:01 ` rguenth at gcc dot gnu dot org
2008-05-16 16:47 ` spop 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).