This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR target/30961 (was: Re: GCC 4.3.0 Status Report (2007-11-04))


On Tue, Nov 06, 2007 at 07:40:00PM +0100, Ulrich Weigand wrote:
> H.J. Lu wrote:
> 
> > Yes, it works for me. I tested it on Linux/ia32, Linux/intel64
> > and linux/ia64. There are no regressions.
> 
> Thanks for testing!
> 
> > gcc/
> > 
> > 2007-11-06  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
> > 
> > 	PR target/30961
> > 	* reload1.c (find_reloads): Also check in_reg when handling a
> > 	simple move with an input reload and a destination of a hard
> > 	register.
> > 
> > gcc/testsuite/
> > 
> > 2007-11-06  H.J. Lu  <hongjiu.lu@intel.com>
> > 
> > 	PR target/30961
> > 	* gcc.target/i386/pr30961-1.c: New.
> 
> This is OK, please check it in.
> 

There was a typo in the patch. This is the one I checked in.

Thanks.


H.J.
---
gcc/

2007-11-06  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	PR target/30961
	* reload1.c (find_reloads): Also check in_reg when handling a
	simple move with an input reload and a destination of a hard
	register.

gcc/testsuite/

2007-11-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/30961
	* gcc.target/i386/pr30961-1.c: New.

--- gcc/reload.c.second	2007-10-03 06:23:52.000000000 -0700
+++ gcc/reload.c	2007-11-06 07:38:33.000000000 -0800
@@ -4462,7 +4462,8 @@ find_reloads (rtx insn, int replace, int
     if (rld[i].when_needed == RELOAD_FOR_INPUT
 	&& GET_CODE (PATTERN (insn)) == SET
 	&& REG_P (SET_DEST (PATTERN (insn)))
-	&& SET_SRC (PATTERN (insn)) == rld[i].in
+	&& (SET_SRC (PATTERN (insn)) == rld[i].in
+	    || SET_SRC (PATTERN (insn)) == rld[i].in_reg)
 	&& !elimination_target_reg_p (SET_DEST (PATTERN (insn))))
       {
 	rtx dest = SET_DEST (PATTERN (insn));
--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second	2007-11-06 07:38:33.000000000 -0800
+++ gcc/testsuite/gcc.target/i386/pr30961-1.c	2007-11-06 07:38:33.000000000 -0800
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+double
+convert (long long in)
+{
+  double f;
+  __builtin_memcpy( &f, &in, sizeof( in ) );
+  return f;
+}
+
+/* { dg-final { scan-assembler-not "movapd" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]