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@xxxxxxxxxx> Sent: Wednesday, November 13, 2024 7:41 AM To: Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>; Hardevsinh Palaniya <hardevsinh.palaniya@xxxxxxxxxxxxxxxxx>; ast@xxxxxxxxxx <ast@xxxxxxxxxx>; andrii@xxxxxxxxxx <andrii@xxxxxxxxxx> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>; Martin KaFai Lau <martin.lau@xxxxxxxxx>; Eduard Zingerman <eddyz87@xxxxxxxxx>; Song Liu <song@xxxxxxxxxx>; Yonghong Song <yonghong.song@xxxxxxxxx>; John Fastabend <john.fastabend@xxxxxxxxx>; KP Singh <kpsingh@xxxxxxxxxx>; Stanislav Fomichev <sdf@xxxxxxxxxxx>; Hao Luo <haoluo@xxxxxxxxxx>; Jiri Olsa <jolsa@xxxxxxxxxx>; Vineet Gupta <vgupta@xxxxxxxxxx>; bpf@xxxxxxxxxxxxxxx <bpf@xxxxxxxxxxxxxxx>; linux-snps-arc@xxxxxxxxxxxxxxxxxxx <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx> 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