[PATCH] target/arm: remove redundant code

gerben@altlinux.org posted 1 patch 3 months, 3 weeks ago
target/arm/vfp_helper.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] target/arm: remove redundant code
Posted by gerben@altlinux.org 3 months, 3 weeks ago
From: Denis Rastyogin <gerben@altlinux.org>

This call is redundant as it only retrieves a value that is not used further.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
---
 target/arm/vfp_helper.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index 62638d2b1f..f020c3c34b 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -1095,8 +1095,6 @@ float64 HELPER(rintd)(float64 x, void *fp_status)
 
     ret = float64_round_to_int(x, fp_status);
 
-    new_flags = get_float_exception_flags(fp_status);
-
     /* Suppress any inexact exceptions the conversion produced */
     if (!(old_flags & float_flag_inexact)) {
         new_flags = get_float_exception_flags(fp_status);
-- 
2.42.2
Re: [PATCH] target/arm: remove redundant code
Posted by Peter Maydell 3 months, 3 weeks ago
On Thu, 12 Dec 2024 at 12:06, <gerben@altlinux.org> wrote:
>
> From: Denis Rastyogin <gerben@altlinux.org>
>
> This call is redundant as it only retrieves a value that is not used further.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Denis Rastyogin <gerben@altlinux.org>



Applied to target-arm.next, thanks.

-- PMM
Re: [PATCH] target/arm: remove redundant code
Posted by Richard Henderson 3 months, 3 weeks ago
On 12/12/24 06:06, gerben@altlinux.org wrote:
> From: Denis Rastyogin <gerben@altlinux.org>
> 
> This call is redundant as it only retrieves a value that is not used further.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
> ---
>   target/arm/vfp_helper.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
> index 62638d2b1f..f020c3c34b 100644
> --- a/target/arm/vfp_helper.c
> +++ b/target/arm/vfp_helper.c
> @@ -1095,8 +1095,6 @@ float64 HELPER(rintd)(float64 x, void *fp_status)
>   
>       ret = float64_round_to_int(x, fp_status);
>   
> -    new_flags = get_float_exception_flags(fp_status);
> -
>       /* Suppress any inexact exceptions the conversion produced */
>       if (!(old_flags & float_flag_inexact)) {
>           new_flags = get_float_exception_flags(fp_status);

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~