]> gcc.gnu.org Git - gcc.git/commitdiff
Improve location for new statements in match-and-simplify phiopt
authorAndrew Pinski <apinski@marvell.com>
Sat, 18 Dec 2021 11:52:37 +0000 (11:52 +0000)
committerAndrew Pinski <apinski@marvell.com>
Sun, 19 Dec 2021 07:16:22 +0000 (07:16 +0000)
Before match-and-simplify was used in phiot, the location of the
new stamtents were all of that of the conditional, this adds that
back as I did not realize gimple_simplify didn't do that for you.

OK? Bootstrapped and tested on x86_64 with no regressions.

gcc/ChangeLog:

* tree-ssa-phiopt.c (gimple_simplify_phiopt): Annotate the
new sequence with the location of the conditional statement.

gcc/tree-ssa-phiopt.c

index 3eac9b1ce465b5ead8e31fba87ec614775edb603..714deab005a1783aa11aaed2aba8d97cfe0931e2 100644 (file)
@@ -900,6 +900,8 @@ gimple_simplify_phiopt (bool early_p, tree type, gimple *comp_stmt,
          result = maybe_push_res_to_seq (&op, &seq1);
          if (result)
            {
+             if (loc != UNKNOWN_LOCATION)
+               annotate_all_with_location (seq1, loc);
              gimple_seq_add_seq_without_update (seq, seq1);
              return result;
            }
@@ -929,6 +931,8 @@ gimple_simplify_phiopt (bool early_p, tree type, gimple *comp_stmt,
          result = maybe_push_res_to_seq (&op1, &seq1);
          if (result)
            {
+             if (loc != UNKNOWN_LOCATION)
+               annotate_all_with_location (seq1, loc);
              gimple_seq_add_seq_without_update (seq, seq1);
              return result;
            }
This page took 0.060267 seconds and 5 git commands to generate.