This is the mail archive of the 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]

Less work in invert_truthvalue


  I noticed in fold-const.c (invert_truthvalue) we were calling build_int_cst
with no type, the using fold_convert on it.  This seems like extra work, so
I removed the call to fold_convert.  I have not attempted to see if there is
any speed up with this patch.

  This patch has been bootstrapped and regtested on powerpc-linux.  Ok for


2005-02-15  James A. Morrison  <>

	* fold-const.c (invert_truthvalue): <INTEGER_CST>: Call 

Index: fold-const.c
RCS file: /cvsroot/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.511
diff -u -p -r1.511 fold-const.c
--- fold-const.c	14 Feb 2005 16:07:08 -0000	1.511
+++ fold-const.c	15 Feb 2005 14:00:34 -0000
@@ -2936,8 +2936,7 @@ invert_truthvalue (tree arg)
   switch (code)
     case INTEGER_CST:
-      return fold_convert (type,
-			   build_int_cst (NULL_TREE, integer_zerop (arg)));
+      return build_int_cst (type, integer_zerop (arg));
     case TRUTH_AND_EXPR:
       return build2 (TRUTH_OR_EXPR, type,

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