[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-12 Thread bje at gcc dot gnu dot org


--- Comment #11 from bje at gcc dot gnu dot org  2009-05-12 22:21 ---
Fixed.


-- 

bje at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-08 Thread meissner at gcc dot gnu dot org


--- Comment #10 from meissner at gcc dot gnu dot org  2009-05-08 22:39 
---
Subject: Bug 40049

Author: meissner
Date: Fri May  8 22:38:49 2009
New Revision: 147298

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147298
Log:
Fix PR 40049

Added:
trunk/gcc/testsuite/gcc.dg/vect/vect-shift-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-07 Thread meissner at gcc dot gnu dot org


--- Comment #8 from meissner at gcc dot gnu dot org  2009-05-07 21:19 
---
Subject: Bug 40049

Author: meissner
Date: Thu May  7 21:18:54 2009
New Revision: 147252

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147252
Log:
Support vector rotates; Fix bug 40049 which caused runtime corruption; Allow
xxpermdi for all vector types; Fix xscvdpsp/xscvspdp; Optimize initialization
of float vectors

Modified:
branches/ibm/power7-meissner/gcc/ChangeLog.power7
branches/ibm/power7-meissner/gcc/config/rs6000/altivec.md
branches/ibm/power7-meissner/gcc/config/rs6000/rs6000-c.c
branches/ibm/power7-meissner/gcc/config/rs6000/rs6000.c
branches/ibm/power7-meissner/gcc/config/rs6000/rs6000.h
branches/ibm/power7-meissner/gcc/config/rs6000/vector.md
branches/ibm/power7-meissner/gcc/config/rs6000/vsx.md
branches/ibm/power7-meissner/gcc/tree-vect-stmts.c


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-07 Thread meissner at linux dot vnet dot ibm dot com


--- Comment #9 from meissner at linux dot vnet dot ibm dot com  2009-05-07 
21:33 ---
Created an attachment (id=17824)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17824action=view)
Updated patch that fixes some internal compiler errors

I discovered in further testing, that vect_get_vec_def_for_operand didn't like
when a scalar had been converted, so I built a constructor for the op in the
non-scalar case.


-- 

meissner at linux dot vnet dot ibm dot com changed:

   What|Removed |Added

  Attachment #17813|0   |1
is obsolete||


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread meissner at linux dot vnet dot ibm dot com


--- Comment #1 from meissner at linux dot vnet dot ibm dot com  2009-05-06 
19:08 ---
Created an attachment (id=17811)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17811action=view)
Patch to fix vector shift by constant on machines with vector/vector shift

This patch fixes the problem in the small case.  While there, I fixed the FIXME
in the next section to use build_constructor instead of
build_constructor_from_list.


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread meissner at linux dot vnet dot ibm dot com


--- Comment #2 from meissner at linux dot vnet dot ibm dot com  2009-05-06 
19:19 ---
Created an attachment (id=17812)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17812action=view)
Simplified test case

This testcase shows the problem.  Without the patch, it generates a vspltiw
(vector splat immediate word) when it should generate vspltish.  Using vsplitw
means that every other vector element will be shifted by 0 instead of 2.


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-05-06 19:20 ---
Wait - I patched this area exactly to avoid type verification issues on x86_64
...

(what do you mean by integer constants do not have a type?  They definitely
do on the tree level)


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-06 19:22 ---
See http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01532.html


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread meissner at linux dot vnet dot ibm dot com


--- Comment #5 from meissner at linux dot vnet dot ibm dot com  2009-05-06 
19:35 ---
Subject: Re:  Incorrect tree made for vector shifted by constant on powerpc,
spu

On Wed, May 06, 2009 at 07:22:25PM -, rguenth at gcc dot gnu dot org wrote:
 
 
 --- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-06 19:22 
 ---
 See http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01532.html
 
 
 -- 
 
 
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40049
 
 --- You are receiving this mail because: ---
 You reported the bug, or are watching the reporter.

The integer constants might have the correct types elsewhere, but in the
specific case of vector shifts, the type is SImode and not HImode.  Perphaps, I
need to make the patch more specific for just shifts.

Powerpc and spu would be the only machines that this shows up on.  X86_64 has
vector/vector shifts for SSE5 mode, but it is unlikely many people would notice
at this stage (also, the x86 has vector shift by constant, in addition to the
vector/vector shift of SSE5).


-- 


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread meissner at linux dot vnet dot ibm dot com


--- Comment #6 from meissner at linux dot vnet dot ibm dot com  2009-05-06 
20:00 ---
Created an attachment (id=17813)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17813action=view)
More targetted patch to fix the problem

This patch is much more targeted to just make sure vector shifts by constant or
loop invarients have the correct type on machines with vector/vector shifts,
and not vector/scalar shifts.


-- 

meissner at linux dot vnet dot ibm dot com changed:

   What|Removed |Added

  Attachment #17811|0   |1
is obsolete||


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



[Bug tree-optimization/40049] Incorrect tree made for vector shifted by constant on powerpc, spu

2009-05-06 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2009-05-06 20:15 ---
Yep, that patch makes more sense.  Please make sure to also test x86_64. 
Thanks.


-- 


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