Patchwork [rs6000] Remove DImode from SLOW_UNALIGNED_ACCESS

login
register
mail settings
Submitter Pat Haugen
Date April 17, 2012, 2:55 p.m.
Message ID <4F8D847A.60000@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/153225/
State New
Headers show

Comments

Pat Haugen - April 17, 2012, 2:55 p.m.
DImode references do not suffer a major performance hit for < 4-byte aligned access like the float types.

Bootstrap/regtest on powerpc64-linux with no new regressions. Ok for trunk?

-Pat


2012-04-17  Pat Haugen <pthaugen@us.ibm.com>

	* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Remove DImode.
David Edelsohn - April 17, 2012, 3:09 p.m.
On Tue, Apr 17, 2012 at 10:55 AM, Pat Haugen
<pthaugen@linux.vnet.ibm.com> wrote:
> DImode references do not suffer a major performance hit for < 4-byte aligned
> access like the float types.
>
> Bootstrap/regtest on powerpc64-linux with no new regressions. Ok for trunk?
>
> 2012-04-17  Pat Haugen <pthaugen@us.ibm.com>
>
>        * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Remove DImode.

Okay.

I think this may have been introduced at the time the port was 32 bit
and DImode values sometimes were allocated to FPRs.

Thanks, David

Patch

Index: gcc/config/rs6000/rs6000.h
===================================================================
--- gcc/config/rs6000/rs6000.h	(revision 186389)
+++ gcc/config/rs6000/rs6000.h	(working copy)
@@ -771,8 +771,7 @@  extern unsigned rs6000_pointer_size;
 #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN)				\
   (STRICT_ALIGNMENT							\
    || (((MODE) == SFmode || (MODE) == DFmode || (MODE) == TFmode	\
-	|| (MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode	\
-	|| (MODE) == DImode)						\
+	|| (MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode)	\
        && (ALIGN) < 32)							\
    || (VECTOR_MODE_P ((MODE)) && (((int)(ALIGN)) < VECTOR_ALIGN (MODE))))