[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2010-02-09 Thread froydnj at gcc dot gnu dot org


--- Comment #6 from froydnj at gcc dot gnu dot org  2010-02-09 17:51 ---
Declaring this one fixed, somewhat late.


-- 

froydnj at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-07-30 Thread froydnj at gcc dot gnu dot org


--- Comment #5 from froydnj at gcc dot gnu dot org  2008-07-30 15:32 ---
Subject: Bug 35866

Author: froydnj
Date: Wed Jul 30 15:30:59 2008
New Revision: 138316

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138316
Log:
PR target/35866

* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Add clause for
vector modes.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.h


-- 


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-05-08 Thread froydnj at gcc dot gnu dot org


--- Comment #4 from froydnj at gcc dot gnu dot org  2008-05-09 03:14 ---
If I understand correctly, one would just need to add vector modes with
appropriate alignment restrictions to SLOW_UNALIGNED_ACCESS.  If I add an extra

|| (((MODE) == V4SFmode || (MODE) == V2DFmode) && (ALIGN) < 128)

to SLOW_UNALIGNED_ACCESS, and compile without -mstrict-align, I get
semi-reasonable looking code at -O2:

f:
   stwu 1,-48(1)
   addi 9,1,16
   stw 28,32(1)
   stw 29,36(1)
   stvx 2,0,9
   lwz 8,12(9)
   lwz 5,0(9)
   lwz 6,4(9)
   mr 0,8
   lwz 7,8(9)
   stw 8,13(3)
   addi 8,1,16
   stw 5,1(3)
   stw 7,9(3)
   stw 6,5(3)
   stw 5,0(8)
   stw 6,4(8)
   stw 7,8(8)
   stw 0,12(8)
   lvx 2,0,8
   lwz 28,32(1)
   lwz 29,36(1)
   addi 1,1,48
   blr

It could be improved, but it's a lot better than -mstrict-align code.


-- 

froydnj at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||froydnj at gcc dot gnu dot
   ||org


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-04-09 Thread joseph at codesourcery dot com


--- Comment #3 from joseph at codesourcery dot com  2008-04-10 00:15 ---
Subject: Re:  Vector load/store from a packed struct does
 not work (without -mstrict-align)

On Tue, 8 Apr 2008, pinskia at gcc dot gnu dot org wrote:

> With -mstrict-align, we get the correct (but suboptimal) answer as the
> middle-end knows that load and stores cannot handled unaligned addresses.
> 
> I think we need more flexible TARGET_STRICT_ALIGN which is based on a mode
> rather than just true or false.

E500 has much the same problem and so is treated as a -mstrict-align CPU, 
with all the associated suboptimal code generation (strict alignment only 
being required for E500 instructions, not for most core instructions).


-- 


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-04-07 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-04-08 02:04 ---
With -mstrict-align, we get the correct (but suboptimal) answer as the
middle-end knows that load and stores cannot handled unaligned addresses.

I think we need more flexible TARGET_STRICT_ALIGN which is based on a mode
rather than just true or false.


-- 


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-04-07 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-04-08 02:00 ---
(In reply to comment #0)
> We use directly a stvx instruction here and this will store in the incorrect
> position.

as stvx masks out the lower bits for a 16byte aligned address.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

Version|4.3.0   |4.4.0


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