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] Use *NARY_CLASS_P more


No functional changes.

Bootstrapped/regtested on x86_64-linux, applying to trunk.

2015-05-20  Marek Polacek  <polacek@redhat.com>

	* cfgexpand.c (expand_debug_expr): Use UNARY_CLASS_P.

	* c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.

diff --git gcc/c-family/c-omp.c gcc/c-family/c-omp.c
index 86a9f54..168cae9 100644
--- gcc/c-family/c-omp.c
+++ gcc/c-family/c-omp.c
@@ -395,7 +395,7 @@ check_omp_for_incr_expr (location_t loc, tree exp, tree decl)
 	  {
 	    tree op1 = TREE_OPERAND (exp, 1);
 	    tree temp = TARGET_EXPR_SLOT (op0);
-	    if (TREE_CODE_CLASS (TREE_CODE (op1)) == tcc_binary
+	    if (BINARY_CLASS_P (op1)
 		&& TREE_OPERAND (op1, 1) == temp)
 	      {
 		op1 = copy_node (op1);
diff --git gcc/cfgexpand.c gcc/cfgexpand.c
index 09e668a..f65e1fc 100644
--- gcc/cfgexpand.c
+++ gcc/cfgexpand.c
@@ -4039,7 +4039,7 @@ expand_debug_expr (tree exp)
 	  op0 = simplify_gen_subreg (mode, op0, inner_mode,
 				     subreg_lowpart_offset (mode,
 							    inner_mode));
-	else if (TREE_CODE_CLASS (TREE_CODE (exp)) == tcc_unary
+	else if (UNARY_CLASS_P (exp)
 		 ? TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0)))
 		 : unsignedp)
 	  op0 = simplify_gen_unary (ZERO_EXTEND, mode, op0, inner_mode);

	Marek


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