[PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

Hardevsinh Palaniya hardevsinh.palaniya at siliconsignals.io
Tue Nov 12 21:13:43 PST 2024


Hi Vadim , Shahab

Thanks for the feedback 

> > 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)

Okay 

> That is absolutely correct. If a new patch is not submitted soon
> I'll try to fix it myself.

if you are okay with that then I can proceed by submitting version 2
of the patch with the proposed changes included 

Best Regards,
Hardev
________________________________________
From: Shahab Vahedi <list+bpf at vahedi.org>
Sent: Wednesday, November 13, 2024 7:41 AM
To: Vadim Fedorenko <vadim.fedorenko at linux.dev>; Hardevsinh Palaniya <hardevsinh.palaniya at siliconsignals.io>; ast at kernel.org <ast at kernel.org>; andrii at kernel.org <andrii at kernel.org>
Cc: Daniel Borkmann <daniel at iogearbox.net>; Martin KaFai Lau <martin.lau at linux.dev>; Eduard Zingerman <eddyz87 at gmail.com>; Song Liu <song at kernel.org>; Yonghong Song <yonghong.song at linux.dev>; John Fastabend <john.fastabend at gmail.com>; KP Singh <kpsingh at kernel.org>; Stanislav Fomichev <sdf at fomichev.me>; Hao Luo <haoluo at google.com>; Jiri Olsa <jolsa at kernel.org>; Vineet Gupta <vgupta at kernel.org>; bpf at vger.kernel.org <bpf at vger.kernel.org>; linux-snps-arc at lists.infradead.org <linux-snps-arc at lists.infradead.org>; linux-kernel at vger.kernel.org <linux-kernel at 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 links or open attachments unless you recognize the sender and know the content is safe.

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 patch is not submitted soon
I'll try to fix it myself.

Cheers,
Shahab


More information about the linux-snps-arc mailing list