[PATCH] D147078: [LICM][BPF] Disable hoistMinMax() optimization for BPF target

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 03:56:38 PDT 2023


mkazantsev added a comment.

In D147078#4241741 <https://reviews.llvm.org/D147078#4241741>, @ast wrote:

> for (i; i < var && i < const_val; i++)
>
> BPF CPU is smart enough to understand that 'i' will not be bigger than const_val. It can check that array[i] within bounds and so on.

I don't see how this transform is a problem for in-bound checks. Do you have a particular example where we can remove a bound check with old form but cannot do so with new form?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147078/new/

https://reviews.llvm.org/D147078



More information about the llvm-commits mailing list