Commit d6a73cc3 by Richard Biener Committed by Richard Biener

ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.

2018-12-11  Richard Biener  <rguenther@suse.de>

	* ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.

From-SVN: r266975
parent c7e8e26e
2018-12-11 Richard Biener <rguenther@suse.de>
* ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
2018-12-11 Jakub Jelinek <jakub@redhat.com> 2018-12-11 Jakub Jelinek <jakub@redhat.com>
PR lto/86004 PR lto/86004
...@@ -94,7 +94,6 @@ ccmp_tree_comparison_p (tree t, basic_block bb) ...@@ -94,7 +94,6 @@ ccmp_tree_comparison_p (tree t, basic_block bb)
static bool static bool
ccmp_candidate_p (gimple *g) ccmp_candidate_p (gimple *g)
{ {
tree rhs;
tree lhs, op0, op1; tree lhs, op0, op1;
gimple *gs0, *gs1; gimple *gs0, *gs1;
tree_code tcode; tree_code tcode;
...@@ -103,20 +102,18 @@ ccmp_candidate_p (gimple *g) ...@@ -103,20 +102,18 @@ ccmp_candidate_p (gimple *g)
if (!g) if (!g)
return false; return false;
rhs = gimple_assign_rhs_to_tree (g); tcode = gimple_assign_rhs_code (g);
tcode = TREE_CODE (rhs);
if (tcode != BIT_AND_EXPR && tcode != BIT_IOR_EXPR) if (tcode != BIT_AND_EXPR && tcode != BIT_IOR_EXPR)
return false; return false;
lhs = gimple_assign_lhs (g); lhs = gimple_assign_lhs (g);
op0 = TREE_OPERAND (rhs, 0); op0 = gimple_assign_rhs1 (g);
op1 = TREE_OPERAND (rhs, 1); op1 = gimple_assign_rhs2 (g);
bb = gimple_bb (g);
if ((TREE_CODE (op0) != SSA_NAME) || (TREE_CODE (op1) != SSA_NAME) if ((TREE_CODE (op0) != SSA_NAME) || (TREE_CODE (op1) != SSA_NAME)
|| !has_single_use (lhs)) || !has_single_use (lhs))
return false; return false;
bb = gimple_bb (g);
gs0 = get_gimple_for_ssa_name (op0); /* gs0 may be NULL */ gs0 = get_gimple_for_ssa_name (op0); /* gs0 may be NULL */
gs1 = get_gimple_for_ssa_name (op1); /* gs1 may be NULL */ gs1 = get_gimple_for_ssa_name (op1); /* gs1 may be NULL */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment