On Tue, Sep 23, 2025 at 3:59 AM <[email protected]> wrote:
>
> From: Pan Li <[email protected]>
>
> The previous fix for PR122021 introduces a typo that the assignment
> to the var itself.  This PR would like to fix the typo, and sorry for
> my silly mistake.
>
> The below test suites are passed for this patch:
> 1. The rv64gcv fully regression tests.
> 2. The x86 bootstrap tests.
> 3. The x86 fully regression tests.

OK.

Richard.

>         PR middle-end/122031
>
> gcc/ChangeLog:
>
>         * tree-ssa-math-opts.cc (build_and_insert_cast): Fix the typo
>         of self assignment.
>
> Signed-off-by: Pan Li <[email protected]>
> ---
>  gcc/tree-ssa-math-opts.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
> index 80d10d26f67..a9903b691a4 100644
> --- a/gcc/tree-ssa-math-opts.cc
> +++ b/gcc/tree-ssa-math-opts.cc
> @@ -1658,7 +1658,7 @@ build_and_insert_cast (gimple_stmt_iterator *gsi, 
> location_t loc,
>               /* Aka any sign extend from small to big size */
>               if (!((val_prec > rhs_prec && !unsigned_val_p && 
> !unsigned_rhs_p)
>                   || (type_prec > val_prec && !unsigned_p && 
> !unsigned_val_p)))
> -               rhs = rhs;
> +               rhs = cast_rhs;
>             }
>         }
>      }
> --
> 2.43.0
>

Reply via email to