[llvm] [LoopVectorize] Perform loop versioning for some early exit loops (PR #120603)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 05:44:06 PST 2025
https://github.com/nikic requested changes to this pull request.
Do I understand correctly that this is generating out-of-bounds loads and relying on page granularity to guarantee they don't trap? If so, we cannot perform this transform with normal loads, because it is UB at the IR level -- the behavior of the underlying hardware is irrelevant.
You're going to need a new load intrinsic to support this. I have this RFC draft on the topic lying around: https://hackmd.io/-vd6H5YIQHimAiJKXpOjVA I haven't submitted it, because I'm not particularly happy with the `%defined_size` parameter, which is needed to specify the operational semantics of the intrinsic, but not relevant for lowering.
https://github.com/llvm/llvm-project/pull/120603
More information about the llvm-commits
mailing list