[Bug target/28232] Wrong aligned load is generated with -m4a on sh-*

2006-10-22 Thread kkojima at gcc dot gnu dot org


--- Comment #4 from kkojima at gcc dot gnu dot org  2006-10-23 00:14 ---
Subject: Bug 28232

Author: kkojima
Date: Mon Oct 23 00:14:39 2006
New Revision: 117961

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117961
Log:
PR target/28232
* config/sh/sh.c (expand_block_move): Use a BLKmode rather than
SImode memory reference for the source of a movua.
* config/sh/sh.md (UNSPEC_MOVUA): New macro.
(movua): Use an unspec instead of sign_extract.  Expect the source
to have mode BLKmode.
(extv, insv): Use a BLKmode rather than SImode memory reference
for the source of a movua.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.md


-- 


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



[Bug target/28232] Wrong aligned load is generated with -m4a on sh-*

2006-10-22 Thread kkojima at gcc dot gnu dot org


--- Comment #5 from kkojima at gcc dot gnu dot org  2006-10-23 00:28 ---
Fixed.


-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug target/28232] Wrong aligned load is generated with -m4a on sh-*

2006-07-10 Thread kkojima at gcc dot gnu dot org


--- Comment #3 from kkojima at gcc dot gnu dot org  2006-07-10 23:02 ---
Richard Sandiford gave a more thorough patch in
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00335.html
and it's approved for the next stage1 of mainline.


-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |kkojima at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-07-10 23:02:25
   date||
   Target Milestone|--- |4.3.0


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



[Bug target/28232] Wrong aligned load is generated with -m4a on sh-*

2006-07-06 Thread patchapp at dberlin dot org


--- Comment #2 from patchapp at dberlin dot org  2006-07-06 22:35 ---
Subject: Bug number PR target/28232

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00266.html


-- 


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



[Bug target/28232] Wrong aligned load is generated with -m4a on sh-*

2006-07-03 Thread kkojima at gcc dot gnu dot org


--- Comment #1 from kkojima at gcc dot gnu dot org  2006-07-03 22:49 ---
I've confirmed that 4.0 and 4.2 behave same as 4.1.  So all compilers
which support -m4a option have this issue.  It seems that the combine
is too smart and replaces the movua insn

(define_insn movua
  [(set (match_operand:SI 0 register_operand =z)
(sign_extract:SI (match_operand:SI 1 unaligned_load_operand Sua)
 (const_int 32) (const_int 0)))]
  TARGET_SH4A_ARCH
  movua.l  %1,%0
  [(set_attr type movua)])

with the usual load insn.  I'm testing the patch below.

--- ORIG/trunk/gcc/config/sh/sh.md  2006-06-14 06:15:09.0 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md 2006-07-03 16:43:56.0 +0900
@@ -152,6 +152,7 @@
   (UNSPEC_THUNK36)
   (UNSPEC_SP_SET   40)
   (UNSPEC_SP_TEST  41)
+  (UNSPEC_MOVUA42)

   ;; These are used with unspec_volatile.
   (UNSPECV_BLOCKAGE0)
@@ -11121,8 +11122,8 @@ mov.l\\t1f,r0\\n\\

 (define_insn movua
   [(set (match_operand:SI 0 register_operand =z)
-   (sign_extract:SI (match_operand:SI 1 unaligned_load_operand Sua)
-(const_int 32) (const_int 0)))]
+   (unspec:SI [(match_operand:SI 1 unaligned_load_operand Sua)]
+  UNSPEC_MOVUA))]
   TARGET_SH4A_ARCH
   movua.l %1,%0
   [(set_attr type movua)])


-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to fail||4.0.3 4.1.1 4.2.0
Summary|wrong movua.l  instruction  |Wrong aligned load is
   |combine  for sh4a   |generated with -m4a on sh-*


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