Re: [PATCH 4/5] sanitizer: Remove dead code in sancov.cc. [PR120581]

Andrea Pinski <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CALvbMcC-P9oLjrsiWecxQSQNdGWOhKituuhubh59GNmpqgpawg@mail.gmail.com>
On Thu, Aug 13, 2026 at 9:18 AM Kael Andrew Alonzo Franco
<[email protected]> wrote:
>
> This is dead since COND_EXPR is always a SSA_NAME or a constant.
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
>
>         PR sanitizer/120581
>
> gcc/ChangeLog:
>
>         * sancov.cc (sancov_pass): Remove dead code.

Ok.


>
> Signed-off-by: Kael Andrew Franco <[email protected]>
> ---
>  gcc/sancov.cc | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/gcc/sancov.cc b/gcc/sancov.cc
> index 79db399736c..85f7c4c6205 100644
> --- a/gcc/sancov.cc
> +++ b/gcc/sancov.cc
> @@ -274,13 +274,6 @@ sancov_pass (function *fun)
>                     instrument_comparison (&gsi,
>                                            gimple_assign_rhs1 (stmt),
>                                            gimple_assign_rhs2 (stmt));
> -                 else if (rhs_code == COND_EXPR
> -                          && COMPARISON_CLASS_P (gimple_assign_rhs1 (stmt)))
> -                   {
> -                     tree cond = gimple_assign_rhs1 (stmt);
> -                     instrument_comparison (&gsi, TREE_OPERAND (cond, 0),
> -                                            TREE_OPERAND (cond, 1));
> -                   }
>                   break;
>                 case GIMPLE_COND:
>                   instrument_comparison (&gsi,
> --
> 2.55.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.