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]

[Committed] bswap: Remove extra divide


Hi,

the attached patch removes an extra divide when calculating the byte
size of a type in the recently added bswap pass.

Committed to mainline as obvious.

Bye,

-Andreas-

2009-06-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* tree-ssa-math-opts.c: Remove extra divide.

Index: gcc/tree-ssa-math-opts.c
===================================================================
--- gcc/tree-ssa-math-opts.c.orig	2009-06-15 10:35:47.000000000 +0200
+++ gcc/tree-ssa-math-opts.c	2009-06-15 11:10:56.000000000 +0200
@@ -1049,8 +1049,6 @@ find_bswap_1 (gimple stmt, struct symbol
 	    if (type_size % BITS_PER_UNIT != 0)
 	      return NULL_TREE;
 
-	    type_size /= BITS_PER_UNIT;
-
 	    if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
 	      {
 		/* If STMT casts to a smaller type mask out the bits not


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