[PATCH] D112016: [IR] Introduce load assume operand bundle

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 10:14:11 PDT 2021


jdoerfert added a comment.

In D112016#3072158 <https://reviews.llvm.org/D112016#3072158>, @nikic wrote:

> In D112016#3071380 <https://reviews.llvm.org/D112016#3071380>, @aeubanks wrote:
>
>> In D112016#3071099 <https://reviews.llvm.org/D112016#3071099>, @nikic wrote:
>>
>>> As long as the load is speculatable, it should count as an ephemeral value and be considered as free by the inliner at least.
>>
>> I'm not seeing that: [...]
>
> Thus the "as long as the load is speculatable" caveat. It works if you add a `dereferenceable(1)` attribute. Though now that I think about this, I have no idea why speculatability is even a requirement for ephemeral values -- shouldn't side-effect freedom be sufficient? In that case your example would work without the `dereferenceable(1)`.

I think side-effect free is sufficient, though, haven't thought long about it. (When you say deref(1) you mean deref(sizeof(access)), right?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112016



More information about the llvm-commits mailing list