[PATCH] D142330: [AssumptionCache] caches @llvm.experimental.guard's

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 09:11:06 PST 2023


nikic added a comment.

> Note that with guards we intersect LVI by reverse traversing from the context instruction upwards till start of basic block. The assumption intersection above it does not do that - it just takes all assumes in the block. isValidAssumeForContext allows assumes which are after the context instruction as long as we will reach that assume (this would be incorrect in the case of guards).

Hm, would you mind explaining in more detail why this is not legal for guards (maybe with an IR sample)? It's not completely clear to me what the distinction is.

But in any case, we could easily accommodate this by adjusting isValidAssumeForContext() -- it has access to the call, so it could skip that particular logic for guards.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142330



More information about the llvm-commits mailing list