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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 00:54:34 PDT 2021


nikic added a comment.

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


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