[PATCH] D156478: [IR] Mark `llvm.assume` as `memory(inaccessiblemem: write)`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 02:45:08 PDT 2023


nikic added a comment.

In D156478#4541650 <https://reviews.llvm.org/D156478#4541650>, @nlopes wrote:

> Assuming that assume can only be used for path-/flow- insensitive invariants (that hold for the whole program), this change is correct. The implication is that the order of assumes doesn't matter.
>
> Alas, with the previous spec, it was already possible to hoist assumes out of branches, so it implied it couldn't be used to assume facts just in a specific branch.
> I need to change Alive2's semantics to make sure that LLVM is using assume in this way only.

Assume definitely needs to be flow sensitive. But I don't understand why this change would remove the flow sensitivity. Assume is still non-speculatable, so it cannot be moved outside of branches.


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

https://reviews.llvm.org/D156478



More information about the llvm-commits mailing list