public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized
@ 2004-06-18  6:24 tjw at omnigroup dot com
  2004-06-18  6:24 ` [Bug tree-optimization/16048] " tjw at omnigroup dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tjw at omnigroup dot com @ 2004-06-18  6:24 UTC (permalink / raw)
  To: gcc-bugs

When compiled with:

$PREFIX/bin/gcc -O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec -S test.c  -o /tmp/test.s                                                                  

the attached test case doesn't get vectorized.  Commenting out the indicated line allows the 
vectorization to happen, but other simple replacements for that line don't allow vectorization (for 
example 'zr = r2').

No comment is written to the .vect file indicating why vectorization failed.

-- 
           Summary: Simple loop doesn't get vectorized
           Product: gcc
           Version: lno
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tjw at omnigroup dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.4.0
  GCC host triplet: powerpc-apple-darwin7.4.0
GCC target triplet: powerpc-apple-darwin7.4.0


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


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

* [Bug tree-optimization/16048] Simple loop doesn't get vectorized
  2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
@ 2004-06-18  6:24 ` tjw at omnigroup dot com
  2004-06-18  6:38 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tjw at omnigroup dot com @ 2004-06-18  6:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tjw at omnigroup dot com  2004-06-18 06:24 -------
Created an attachment (id=6554)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6554&action=view)
Test case


-- 


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


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

* [Bug tree-optimization/16048] Simple loop doesn't get vectorized
  2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
  2004-06-18  6:24 ` [Bug tree-optimization/16048] " tjw at omnigroup dot com
@ 2004-06-18  6:38 ` pinskia at gcc dot gnu dot org
  2004-06-20  3:47 ` tjw at omnigroup dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-18  6:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-18 06:38 -------
Actually you have to supply -fdump-tree-vect-details to find out why it failes:
unhandled non-array data ref
zr_83 = *T.2_85;
loop_analyzer: bad data references.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|powerpc-apple-darwin7.4.0   |
   GCC host triplet|powerpc-apple-darwin7.4.0   |
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-18 06:38:01
               date|                            |
   Target Milestone|---                         |lno


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


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

* [Bug tree-optimization/16048] Simple loop doesn't get vectorized
  2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
  2004-06-18  6:24 ` [Bug tree-optimization/16048] " tjw at omnigroup dot com
  2004-06-18  6:38 ` pinskia at gcc dot gnu dot org
@ 2004-06-20  3:47 ` tjw at omnigroup dot com
  2004-06-20  4:04 ` pinskia at gcc dot gnu dot org
  2004-08-25  5:24 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tjw at omnigroup dot com @ 2004-06-20  3:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tjw at omnigroup dot com  2004-06-20 03:47 -------
I don't see the message you note below.  Instead, I see the following:

examining statement:
r2_79 = __builtin_powf (zr_85, 2.0e+0);

get vectype for scalar type:  float
use not simple.
stmt not supported.
r2_79 = __builtin_powf (zr_85, 2.0e+0);
loop_analyzer: bad operations.


My guess is that the 'zr = r2 - i2 + cr' statement's use of r2 and i2 (which are zr*zr and zi*zi, 
respectively) is getting 'optimized' into a pow(..., 2) which the vectorization then can't handle.

-- 


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


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

* [Bug tree-optimization/16048] Simple loop doesn't get vectorized
  2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
                   ` (2 preceding siblings ...)
  2004-06-20  3:47 ` tjw at omnigroup dot com
@ 2004-06-20  4:04 ` pinskia at gcc dot gnu dot org
  2004-08-25  5:24 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-20  4:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-20 04:04 -------
oh, I must be using the old version of the lno but if what you gave is the case the vectorizer needs to 
reconize __builtin_powf (x, 2.0) as x * x then.

-- 


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


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

* [Bug tree-optimization/16048] Simple loop doesn't get vectorized
  2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
                   ` (3 preceding siblings ...)
  2004-06-20  4:04 ` pinskia at gcc dot gnu dot org
@ 2004-08-25  5:24 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-25  5:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-25 05:24 -------
This is fixed, at least on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|lno                         |3.5.0


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


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

end of thread, other threads:[~2004-08-25  5:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-18  6:24 [Bug tree-optimization/16048] New: Simple loop doesn't get vectorized tjw at omnigroup dot com
2004-06-18  6:24 ` [Bug tree-optimization/16048] " tjw at omnigroup dot com
2004-06-18  6:38 ` pinskia at gcc dot gnu dot org
2004-06-20  3:47 ` tjw at omnigroup dot com
2004-06-20  4:04 ` pinskia at gcc dot gnu dot org
2004-08-25  5:24 ` pinskia 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).