public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [cft] emit_group_load/store fallout
@ 2004-10-27 17:36 Richard Henderson
  2004-10-27 17:40 ` Andrew Pinski
  2004-10-27 17:53 ` Aldy Hernandez
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2004-10-27 17:36 UTC (permalink / raw)
  To: Aldy Hernandez, pinskia, gcc-patches

From the ppc test case in 18163, it looks like things worked 
before in the cases of a memory destination.  Which is fine
because we pretty much can do anything we want frobbing the
mode of memory -- unlike with registers.

Try this.


r~



Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.736
diff -c -p -d -u -r1.736 expr.c
--- expr.c	26 Oct 2004 23:17:57 -0000	1.736
+++ expr.c	27 Oct 2004 17:15:35 -0000
@@ -1571,7 +1571,7 @@ emit_group_load (rtx dst, rtx orig_src, 
 
   gcc_assert (GET_CODE (dst) == PARALLEL);
 
-  if (!SCALAR_INT_MODE_P (m) && m != BLKmode)
+  if (!SCALAR_INT_MODE_P (m) && !MEM_P (orig_src))
     {
       enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src));
       if (imode == BLKmode)
@@ -1745,7 +1745,7 @@ emit_group_store (rtx orig_dst, rtx src,
 
   gcc_assert (GET_CODE (src) == PARALLEL);
 
-  if (!SCALAR_INT_MODE_P (m) && m != BLKmode)
+  if (!SCALAR_INT_MODE_P (m) && !MEM_P (orig_dst))
     {
       enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst));
       if (imode == BLKmode)

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

* Re: [cft] emit_group_load/store fallout
  2004-10-27 17:36 [cft] emit_group_load/store fallout Richard Henderson
@ 2004-10-27 17:40 ` Andrew Pinski
  2004-10-27 17:53 ` Aldy Hernandez
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2004-10-27 17:40 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc-patches, Aldy Hernandez, pinskia


On Oct 27, 2004, at 1:18 PM, Richard Henderson wrote:

>> From the ppc test case in 18163, it looks like things worked
> before in the cases of a memory destination.  Which is fine
> because we pretty much can do anything we want frobbing the
> mode of memory -- unlike with registers.
>
> Try this.

Yes this fixes the problem.

Thanks,
Andrew Pinski

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

* Re: [cft] emit_group_load/store fallout
  2004-10-27 17:36 [cft] emit_group_load/store fallout Richard Henderson
  2004-10-27 17:40 ` Andrew Pinski
@ 2004-10-27 17:53 ` Aldy Hernandez
  2004-10-27 18:00   ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Aldy Hernandez @ 2004-10-27 17:53 UTC (permalink / raw)
  To: Richard Henderson, pinskia, gcc-patches

On Wed, Oct 27, 2004 at 10:18:19AM -0700, Richard Henderson wrote:
> >From the ppc test case in 18163, it looks like things worked 
> before in the cases of a memory destination.  Which is fine
> because we pretty much can do anything we want frobbing the
> mode of memory -- unlike with registers.
> 
> Try this.

Yeah it does.

Would it be ok to (a) commit it (b) add a comment to the effect.

	* expr.c (emit_group_store): Allow mode changes of memory in
	parallels.
	(emit_group_load): Same.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.736
diff -c -p -r1.736 expr.c
*** expr.c	26 Oct 2004 23:17:57 -0000	1.736
--- expr.c	27 Oct 2004 17:39:27 -0000
*************** emit_group_load (rtx dst, rtx orig_src, 
*** 1571,1577 ****
  
    gcc_assert (GET_CODE (dst) == PARALLEL);
  
!   if (!SCALAR_INT_MODE_P (m) && m != BLKmode)
      {
        enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src));
        if (imode == BLKmode)
--- 1571,1579 ----
  
    gcc_assert (GET_CODE (dst) == PARALLEL);
  
!   if (!SCALAR_INT_MODE_P (m)
!       /* We can frob the mode of a memory, but not of a register.  */
!       && !MEM_P (orig_src))
      {
        enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src));
        if (imode == BLKmode)
*************** emit_group_store (rtx orig_dst, rtx src,
*** 1745,1751 ****
  
    gcc_assert (GET_CODE (src) == PARALLEL);
  
!   if (!SCALAR_INT_MODE_P (m) && m != BLKmode)
      {
        enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst));
        if (imode == BLKmode)
--- 1747,1755 ----
  
    gcc_assert (GET_CODE (src) == PARALLEL);
  
!   if (!SCALAR_INT_MODE_P (m)
!       /* We can frob the mode of a memory, but not of a register.  */
!       && !MEM_P (orig_dst))
      {
        enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst));
        if (imode == BLKmode)

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

* Re: [cft] emit_group_load/store fallout
  2004-10-27 17:53 ` Aldy Hernandez
@ 2004-10-27 18:00   ` Richard Henderson
  2004-10-27 18:08     ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2004-10-27 18:00 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: pinskia, gcc-patches

On Wed, Oct 27, 2004 at 01:40:31PM -0400, Aldy Hernandez wrote:
> Would it be ok to (a) commit it (b) add a comment to the effect.

The comment is ok.  Let's get some successful build results
before committing it.


r~

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

* Re: [cft] emit_group_load/store fallout
  2004-10-27 18:00   ` Richard Henderson
@ 2004-10-27 18:08     ` Aldy Hernandez
  0 siblings, 0 replies; 5+ messages in thread
From: Aldy Hernandez @ 2004-10-27 18:08 UTC (permalink / raw)
  To: Richard Henderson, pinskia, gcc-patches

On Wed, Oct 27, 2004 at 10:44:08AM -0700, Richard Henderson wrote:
> On Wed, Oct 27, 2004 at 01:40:31PM -0400, Aldy Hernandez wrote:
> > Would it be ok to (a) commit it (b) add a comment to the effect.
> 
> The comment is ok.  Let's get some successful build results
> before committing it.

Pinskia, could you take care of this, since my build system obviously
doesn't trigger this problem :-).

Aldy

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

end of thread, other threads:[~2004-10-27 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 17:36 [cft] emit_group_load/store fallout Richard Henderson
2004-10-27 17:40 ` Andrew Pinski
2004-10-27 17:53 ` Aldy Hernandez
2004-10-27 18:00   ` Richard Henderson
2004-10-27 18:08     ` Aldy Hernandez

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).