Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-13 Thread Shahab Vahedi
Hardev wrote: > Shahab wrote:  > > > > Vadim wrote: > > > > > > > > > The original code is obviously optimized out, but the intention, I > > > believe, was to check if the jump is conditional or not. > > > So the proper fix should change the code to check cond: > > > > > > - if (ARC_CC_AL) >

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-12 Thread Hardevsinh Palaniya
islav Fomichev ; Hao Luo ; Jiri Olsa ; Vineet Gupta ; b...@vger.kernel.org ; linux-snps-arc@lists.infradead.org ; linux-ker...@vger.kernel.org Subject: Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check   CAUTION: This email originated from outside the organization. Do not click lin

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-12 Thread Shahab Vahedi
Vadim Fedorenko wrote: > The original code is obviously optimized out, but the intention, I > believe, was to check if the jump is conditional or not. > So the proper fix should change the code to check cond: > > - if (ARC_CC_AL) > + if (cond == ARC_CC_AL) That is absolutely correct. If a new p

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-11 Thread Vadim Fedorenko
On 11/11/2024 14:19, Hardevsinh Palaniya wrote: The condition 'if (ARC_CC_AL)' is always true, as ARC_CC_AL is a constant integer. This makes the check redundant, so it is safe to remove. Signed-off-by: Hardevsinh Palaniya --- arch/arc/net/bpf_jit_arcv2.c | 5 + 1 file changed, 1 inserti

[PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-11 Thread Hardevsinh Palaniya
The condition 'if (ARC_CC_AL)' is always true, as ARC_CC_AL is a constant integer. This makes the check redundant, so it is safe to remove. Signed-off-by: Hardevsinh Palaniya --- arch/arc/net/bpf_jit_arcv2.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arc/net/bp