]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PHIOPT: small cleanup in match_simplify_replacement
authorAndrew Pinski <apinski@marvell.com>
Sun, 9 Apr 2023 02:03:38 +0000 (19:03 -0700)
committerAndrew Pinski <apinski@marvell.com>
Tue, 18 Apr 2023 14:39:53 +0000 (07:39 -0700)
We know that the statement we are moving is already
have a SSA_NAME on the lhs so we don't need to
check that and can also just call reset_flow_sensitive_info
with the name we already got.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (match_simplify_replacement):
Simplify code that does the movement slightly.

gcc/tree-ssa-phiopt.cc

index 16acd2f1894d9f97e2e53ae7665ea5675981cb98..4ddb4d5db9031682a8a80f1be8b0e2712793c4db 100644 (file)
@@ -1094,11 +1094,10 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb,
 
       tree name = gimple_get_lhs (stmt_to_move);
       // Mark the name to be renamed if there is one.
-      if (name && TREE_CODE (name) == SSA_NAME)
-       bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name));
+      bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name));
       gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move);
       gsi_move_before (&gsi1, &gsi);
-      reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move));
+      reset_flow_sensitive_info (name);
     }
 
   replace_phi_edge_with_variable (cond_bb, e1, phi, result, inserted_exprs);